Missing XL97 data and header problems

W

Wayne Olson

My first attempt at mail merge with Word97 and XL97 failed miserably. When
I selected my XL file as data source none of the fields were selected as
headings. Instead "Mergefieldx" etc. So I tried setting the optional
header using the same file. That seemed to work. But when I selected
"merge" all the data fields are blank. I think Cindy Meister had a comment
in her FAQ that said the main merge document must have at least one field
called "Mergefield" or the merge will not execute. How can I get that field
if it doesn't occur in my XL file. I don't understand what that means.

I stripped my XL file of all data except the desired columns with header
info in Row 1. Also why were the field names changed to put underlines
between words and numbers preceded with M_? Will these still find the right
columns if I use separate words in my column headings?
 
P

Peter Jamieson

My first attempt at mail merge with Word97 and XL97 failed miserably.
When
I selected my XL file as data source none of the fields were selected as
headings.

Let's step back a bit here.

What does your XL sheet contain? e.g. what is in the first few columns of
the first row?

When you make the connection to the data source, do you see a dialog box
with the option "Entire Spreadsheet"? If so, do you select that default
option or type something else?

After you have made the connection from Word to the XL data source,
a. if you click the "MailMergeHelper" icon on the merge toolbar, is the
pathname of the data source visible in the dialog box(under the "get data"
button)?
b. what field names appear in the drop-down that appears when you click the
"Insert Merge Field" button on the merge toolbar?
I think Cindy Meister had a comment
in her FAQ that said the main merge document must have at least one field
called "Mergefield" or the merge will not execute. How can I get that field
if it doesn't occur in my XL file. I don't understand what that means.

When you use the "Insert merge field" button on the merge toolbar, Word
inserts a "placeholder" field whose value will be filled in from the
appropriate column and row in the data source for each record in that source
when you merge. Suppose you insert a "Surname" field. Typically you will see
<<Surname>> (except the << and >> are actually "chevron" characters). If you
press the button on the merge toolbar that shows <<>> on top and ABC
underneath, you should toggle between <<Surname>> and the data belonging to
the current record being previewed. If you press Alt-F9, you should see what
the "underlying" field code is really like. In this case, you will probably
see something like

{ MERGEFIELD Surname }

So the MERGEFIELD refers to the /type/ of the field (there are other types
such as { IF }, { REF }. { SET } and so on), not the field name.
What Cindy means is that Word will not let you execute the merge unless
there is at least one of these fields in your mail merge main document.

NB, do /not/ try to change the names of Mergefields by altering the name
when you are seeing the <<Surname>> view. It doesn't work. If you want to
change a name, either insert a new field from the drop-down list and delete
the one you didn't want, or use ALt-F9 to go to the { MERGEFIELD Surname }
view and change the name there.
Also why were the field names changed to put underlines
between words and numbers preceded with M_? Will these still find the right
columns if I use separate words in my column headings?

Yes, if your column names contain spaces, Word will use underscores instead.
Word should organise all this for you. (However, I am looking at Word/XL
2000 here so there may be some differences).
 

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