MS Word invalid mail merge

jkimzlg
jkimzlg used Ask the Experts™
on
I've been trying to do fix this problem for awhile! Basically this morning somehow when i try to generate docs those filed will no longer merge! Can someone please help me base on the screenshot below?
error.JPG
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Awarded 2010

Commented:
Hello,

it seems that the source file for the mail merge does not have the correct delimiters for either the fields or the records. There should be a comma between fields of the same record, and an Enter character at the end of each record. Can you post the first dozen or so rows of the TXT file for inspection? Please do not post confidential data.

cheers, teylyn

Author

Commented:
are you referring to the law_co.txt? sorry i'm not sure which txt file
Most Valuable Expert 2011
Awarded 2010

Commented:
The one listed in the first error message:

Z:\Abacus\LawTemp\Law_CO.TXT

That's the one Word is trying to open as the data source, and that's the one that triggers the ensuing error messages.
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

Author

Commented:
is it possible if i can get your email and send it to u via email?
GrahamSkanRetired
Top Expert 2012

Commented:
The first message isn't an error. It is a routine security message which could be removed with a registry patch.

It isn't clear what you did what you encountered the second 'error'. It looks as if the file is not tab-separated, but comma-separated, though not in a rigorous format with the fields in quotes: "File_(a) Preparing", "File_(b) Recording", "File_(c) Filing",  ...

Note that teylyn and I both have email addresses in our respective profiles, though hers is easier to read.

Author

Commented:
Any solution? someone please help i am really stressed about this and don't know what to do.
Most Valuable Expert 2011
Awarded 2010

Commented:
Without seeing the file, it's hard to suggest a solution.

I suggested that you upload a sample of the text file for inspection. GrahamSkan has pointed you to our respective email addresses.

cheers, teylyn

Author

Commented:
i've send a sample of the text file for inspection to your email address, can you please enlighten me!
GrahamSkanRetired
Top Expert 2012

Commented:
The first record of this file, i.e. up to the first carriage return and line feed,  which would be treated as the header has 709 fields. The others have 269, 1, 396,34,1, though I may have missed some. The 709 seems an enormous number. Even if this is legal, the other following records should have the same number of fields.

Author

Commented:
How should i carry on from here? Please enlighten me
Most Valuable Expert 2011
Awarded 2010
Commented:
For what it's worth, I've just opened the TXT file and come to the same results as GrahamSkan.

>> How should i carry on from here? Please enlighten me

You need to find out which system created the TXT file. Something has gone wrong in the creation of that file.

Even if the 709 fields were correct, the information in the records below does not appear to be the same in every record. Also, the first few dozen of the field names in the TXT file have spaces. I'm pretty sure that this is not an acceptable format for a mail merge.

Get in touch with whoever provides the TXT file and find out what they changed since the last time the mail merge worked for you with the last file they provided.

Basically, you need a correctly formatted TXT file, then the mail merge should probably work fine.

Hope that helps,

teylyn



Retired
Top Expert 2012
Commented:
You haven't said how the input file is created, but it needs to be valid.

It is hard believe that you are going to position over 700 merge fields in your document, so firstly reduce the fields to the ones that you actually intend to use. Secondly ensure that each data record has the same number of fields as the header.
 Main.docx
law-co-short.txt
GrahamSkanRetired
Top Expert 2012

Commented:
Oops! Pressed submit too early

I have used your text file as a basis for a twenty-field example with a header and two data records  (no names in the files)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial