If the fixed text is on line 0 and the required text is on line 2 then rather than split the line add the difference to the required line and use the whole line e.g.
If InStr(1, vText(i), "Customer Name:") > 0 Then
xlSheet.Range("B" & rCount) = Trim(vText(i + 2))
End If
For Access you will have to wait until I release an add-in that I have developed with my friend Greg Maxey that takes all the thinking out of the task for extracting the data from messages to Access, Excel or Word. The add-in is complete but we are still discussing how to present it to get some return from it, and thanks to on-going medical treatment I have not had much time to work with him recently.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
|