Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
How do I set right and left alignment on the same line in Word? | Page Layout | |||
chapter & page number @ bottom of page | Page Layout | |||
How do I create a Word form like corel WP merge documents? | Microsoft Word Help | |||
Enhance merge to email feature of word with cc: merge field. | Mailmerge | |||
Word Field Codes in Excel data file | Mailmerge |