Ms Word Macro problem when reading data from a text file

S

sympatico

Hi guys, I encounter some problem with Ms Word macro problem and hope you
guys can give me some help.

I encounter this problem after I convert some macro from Ms Word 95 to Ms
Word 2000.

I have a set of macro that will do the following:

- grap some data from database, and put those data into a text file.( seem
like separated by tab)
- Then the data in the text file will be read and put into a template of
document. (an application form)

In Ms Word 95, everything work just fine. But when convert to 2000, I found
some bugs and rectified it, now, it's error

free, but the field are not filled with the correct data. My finding is :

- it seem to have problem when it encounter a character look like a black
square box in the text file ( i guess it

is a new line character, cause user might enter new line character when they
key in there home address)

so, I suspect the problem is the macro doesn't read from the text file
properly, but really no idea how to correct this.

please help.





below are the macro before and after converted:




before converted :

http://www.geocities.com/cf_boonkeong/oldMerge.txt




After converted (Word 2000):

http://www.geocities.com/cf_boonkeong/newMerge.txt


Please help, thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top