View Single Post
  #2  
Old June 20th 07, 12:52 PM posted to microsoft.public.outlook.program_vba
bony_tony
external usenet poster
 
Posts: 5
Default Attach documents to mail merged emails based on merge fields

It's ok, don't worry, found a function some outlook genius posted ;-)

Function ParseTextLinePair(strSource As String, strLabel As String)
Dim intLocLabel As Integer
Dim intLocCRLF As Integer
Dim intLenLabel As Integer
Dim strText As String

' locate the label in the source text
intLocLabel = InStr(strSource, strLabel)
intLenLabel = Len(strLabel)
If intLocLabel 0 Then
intLocCRLF = InStr(intLocLabel, strSource, vbCrLf)
If intLocCRLF 0 Then
intLocLabel = intLocLabel + intLenLabel
strText = Mid(strSource, _
intLocLabel, _
intLocCRLF - intLocLabel)
Else
intLocLabel = Mid(strSource, intLocLabel + intLenLabel)
End If
End If
ParseTextLinePair = Trim(strText)
End Function

Ads
 

Credit Card Menu - Mobile Phones - Online Loans - Free Ringtones - Debt Consolidation