View Single Post
 
Old 09-27-2014, 12:58 PM
megatronixs megatronixs is offline Windows XP Office 2003
Advanced Beginner
 
Join Date: Aug 2012
Posts: 42
megatronixs is on a distinguished road
Default

Hi Gmayor,

I have some problems when I try it out with a table copied from word to the email for testing. I can't find what to change to get the get the customer name from the table.
Where in the code the change is needed?

Code:
'Check each line of text in the message body
For i = UBound(vText) To 0 Step -1
If InStr(1, vText(i), "Source:") > 0 Then
vItem = Split(vText(i), Chr(58))
xlSheet.Range("A" & rCount) = Trim(vItem(1))
End If

If InStr(1, vText(i), "Customer Name:") > 0 Then
vItem = Split(vText(i), Chr(58))
xlSheet.Range("B" & rCount) = Trim(vItem(1))
End If
After running the macro to test the lines, field name for customer name comes on line 0 and the customer name itself comes on line 2. I hope this helps.

Greetings.
Reply With Quote