Question
June 7, 2007 at 03:00 AM
birling

autofill word doc with data from .txt using VBA

by birling . Updated 19 years, 4 months ago

Hi Guys, I have managed to use examples of code from here to help me setup a document template, but my understanding of VBA is still limited.
I now want to extract a particular set of data, in this case a row of address details from a .txt file based on the ‘customer line number’ entered by the user. ie Text file:
Line1,add1,add2,add3
Line2,add1,add2,add3

User inputs Line1 and the data is then to go into the word doc, where I have set some bookmarks.

Is the .txt format the best option or is it easier to have the data in say excel?
Hope this is clear enough and you can provide me some code or suggestions.
many thanks, B

This discussion is locked

All Comments