Access, Word, and merge problems

C

CP

Hi, everyone. I am using Access 2007 & Word 2007 with a document
template that is the "primary" document for a mail merge (I'm pretty
sure it's a catalog) and a Data Source that is a .TXT file that is
created from an Access database using DoCmd.TransferText
acExportMerge...

Users create different Data Sources depending on the data they need
to
report on but they are all created the same way. Generally, the .TXT
file is created and the data is successfully incorporated into the
Word 2007 template. SOMETIMES, however, the user gets prompted for
"Header Records Delimiter" or is told that the .TXT file isn't valid.
There must be some garbage in the .TXT file or it must contain a
"reserved word" or something like that. BUT when I retrieve the .TXT
file in NotePad, Word, WordPad, or Excel, I can't see anything that
doesn't belong.


(Interestingly, when I retrieve a .TXT file that works correctly into
Word, I'm prompted to Convert file from PLAIN TEXT. But when I
retrieve one of the problem .TXT files into Word, I'm prompted to
Convert File from ENCODED TEXT. Something is obviously different
between the two files.)


I'm hoping that someone has some ideas for other ways to find garbage
in .TXT files or any other ideas about what might be happening to
cause this problem. Please let me know if you need more information.
Thanks. Carol.
 
C

CertifiedNSA

Hi, everyone.  I am using Access 2007 & Word 2007 with a document
template that is the "primary" document for a mail merge (I'm pretty
sure it's a catalog) and a Data Source that is a .TXT file that is
created from an Access database using DoCmd.TransferText
acExportMerge...

Users create different Data Sources depending on the data they need
to
report on but they are all created the same way.  Generally, the .TXT
file is created and the data is successfully incorporated into the
Word 2007 template.  SOMETIMES, however, the user gets prompted for
"Header Records Delimiter" or is told that the .TXT file isn't valid.
There must be some garbage in the .TXT file or it must contain a
"reserved word" or something like that.  BUT when I retrieve the .TXT
file in NotePad, Word, WordPad, or Excel, I can't see anything that
doesn't belong.

(Interestingly, when I retrieve a .TXT file that works correctly into
Word, I'm prompted to Convert file from PLAIN TEXT.  But when I
retrieve one of the problem .TXT files into Word, I'm prompted to
Convert File from ENCODED TEXT.  Something is obviously different
between the two files.)

I'm hoping that someone has some ideas for other ways to find garbage
in .TXT files or any other ideas about what might be happening to
cause this problem.  Please let me know if you need more information.
Thanks.  Carol.

Dump your .txt file into Excel just to help visualize any problems.
If Excel doesn't like something then Word won't either.

It is not necessary to "retrieve" the text file into Word for your
merge. Just link to it if it is well structured with headers and
field delimiters.
Dennis
 
C

CP

Hi, Dennis. Excel doesn't mind the file at all...(BTW -- It's tab
delimited with double quotes around each field)

(I know that I don't need to retrieve the text file into Word. I just
did that to see if anything strange popped up.)

Other ideas? Carol.
 
C

CertifiedNSA

Hi, Dennis.  Excel doesn't mind the file at all...(BTW -- It's tab
delimited with double quotes around each field)

(I know that I don't need to retrieve the text file into Word.  I just
did that to see if anything strange popped up.)

Other ideas?  Carol.

Reviewing your post again I note that the issue seems to be "Header
Records Delimiter". I haven't seen the problem pop up in that manner
but the error looks like Word is SOMETIMES confused about the
delimiter in the header record. Perhaps a tab delimiter in the header
and a comma delimiter in the data??
Could you please post a sample of one of the offending files? Maybe
take the Word mm wizard and step through the merge process to see what
it does about separating the offending file in the delimiter
verification step.
I have seen many data source files where there was some sort of goofy
character outside any quotes that the mm process did not know how to
handle.
If your file appears to have everything in dbl quotes with only
delimiters between the fields I would look at the Access records. One
is likely corrupt which usually appears as a bunch of kanji
characters.
Judge the failure point and check there. If it is with the header
then manually remove the header and replace with one that you know
works. If that solves the problem then view the offending header
record very closely. If it is a data record then remove data records
until it works and then see what Access is storing as part of that
record.
Dennis
 
C

CertifiedNSA

Hi, Dennis.  Excel doesn't mind the file at all...(BTW -- It's tab
delimited with double quotes around each field)

(I know that I don't need to retrieve the text file into Word.  I just
did that to see if anything strange popped up.)

Other ideas?  Carol.

You can use some Excel or VB commands to "clean" up the data. Try one
at a time to see which solves your problem and then track down how it
is created in the Access record. The Clean() function solves problems
with non printing characters in early ASCII. Otherwise use a
combination of Trim, Clean, Substitute procedures.
http://office.microsoft.com/en-us/e...ell-HP003056131.aspx?CTT=5&origin=HP005209014
Dennis
 

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