Reply
 
Thread Tools Display Modes
  #1   Report Post  
 
Posts: n/a
Default Word merge field names vs. Excel merge field names

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

  #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



  #3   Report Post  
 
Posts: n/a
Default Word merge field names vs. Excel merge field names

Thank you Doug, but
the problem is that I have to repair to bad things done by our
customers. That is, I receive a MailMerge Word document and its data
source in Excel format. And you can't even imagine what our customers
can call the header fields in the Excel file!!! Something like "Company
Name", or "Citta' ", or even "Fax. number " (yes, with all
those trailing spaces!!!)
Thus, I really have to know the general rule for matching Word fields
and the corresponding Excel fields!

Thank you
Alessio

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

I think what I would do is delete the row containing the "field" names and
then replace it with a row containing appropriate field names.

--
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...
Thank you Doug, but
the problem is that I have to repair to bad things done by our
customers. That is, I receive a MailMerge Word document and its data
source in Excel format. And you can't even imagine what our customers
can call the header fields in the Excel file!!! Something like "Company
Name", or "Citta' ", or even "Fax. number " (yes, with all
those trailing spaces!!!)
Thus, I really have to know the general rule for matching Word fields
and the corresponding Excel fields!

Thank you
Alessio



  #5   Report Post  
 
Posts: n/a
Default Word merge field names vs. Excel merge field names

Thank you again, Doug,
bvut the problem is that I have to manage the documents in ana
application, not me manually. That is, I have to instruct my
application (which now creates the single, merged documents, by merging
the record values of the Excel file into the merge fields of the Word
documents), I have to instruct my application in order to have it
AUTOMATICALLY "know" which Word merge field corresponds to which Excel
header.
Thus, I really cannot edit the files by hand (my work would change,
from computer programmer to Excel document editor, LOL).
I ahve to know the general rule that tells me "when you have an Excel
header field with spaces and dots, then its is replaced, in the
corresponding Word document merge field, with a string made of.....
etc".
I'm sure that Microsoft people know exactly this rule, because they
wrote the programs (i.e. Word and Excel) which do this mapping
automatically.

Thank you for your help (and any further help)
Alessio



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

It seems to me that a space is replace by an underscore, an underscore is
retained and other punctation type separators that I tried (' # & , etc) are
deleted.

I do not know of any source of rules on this and quite frankly, I am
surprised that field names that do not conform to the norms (from say the
dBase days) are not just rejected.

--
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
oups.com...
Thank you again, Doug,
bvut the problem is that I have to manage the documents in ana
application, not me manually. That is, I have to instruct my
application (which now creates the single, merged documents, by merging
the record values of the Excel file into the merge fields of the Word
documents), I have to instruct my application in order to have it
AUTOMATICALLY "know" which Word merge field corresponds to which Excel
header.
Thus, I really cannot edit the files by hand (my work would change,
from computer programmer to Excel document editor, LOL).
I ahve to know the general rule that tells me "when you have an Excel
header field with spaces and dots, then its is replaced, in the
corresponding Word document merge field, with a string made of.....
etc".
I'm sure that Microsoft people know exactly this rule, because they
wrote the programs (i.e. Word and Excel) which do this mapping
automatically.

Thank you for your help (and any further help)
Alessio



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set right and left alignment on the same line in Word? Matador Page Layout 1 November 9th 05 09:32 PM
chapter & page number @ bottom of page Grace Page Layout 9 October 12th 05 06:38 AM
How do I create a Word form like corel WP merge documents? dlee_at_mmsgov Microsoft Word Help 2 October 8th 05 06:29 AM
Enhance merge to email feature of word with cc: merge field. Efficeint Word User Mailmerge 2 April 5th 05 05:05 AM
Word Field Codes in Excel data file mranz Mailmerge 7 December 11th 04 10:02 AM


All times are GMT +1. The time now is 09:03 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"