View Single Post
  #2   Report Post  
Doug Robbins - Word MVP
 
Posts: n/a
Default Word merge field names vs. Excel merge field names

If you are looking for a general rule, make that field names should not
include spaces.

See the article "Creating a Mail Merge Data Source" at:

http://www.word.mvps.org/FAQs/MailMe...DataSource.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

wrote in message
ups.com...
Hello everybody,
I realized that, when the Excel sheet contains headers named with
character strings containing spaces, dots, minus signs, apstrophes,
etc, these single characters, or sequences of these characters, are all
converted into a single underscore in Word fields.

For example, if my Excel sheet contains the following header names
(please ignore double quotes):

"name"
"last name"
"company.name"

then the Word document, after having joined it to the data source and
added to it the merge fields, will contain fields whose names are
respectively:

"name"
"last_name"
"company_name"

and this behaviour gives me some problems. Apart from the reason why I
have these problems, here is my question:

Is there a general rule which can be used to predict the exact form of
a certain Word merge field, given the exact form of the corresponding
header in the Excel sheet?

Thank you very much
Cardamomo