Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
One datasource - Multiple documents
I have a merge that is one datasource, but has multiple types of letters that
need to be printed. Each letter is represented by an individual code (EX: AA) Everytime my datasource includes letter_code AA, I want the text from letter AA to print. I have about 50 different letter codes. Merge may not be the best way to do this, and I'm open to suggestions on how to handle this. I currently have the main letter set up as {IF {MERGEFIELD LETTER_CODE} = "AA" "{INCLUDETEXT AA.DOC}" ""}. Is there a better/easier way to do this? I've also just upgraded from an old version of office (I believe it was Office 2000) to Office 2003 and have to redo the main merge letter, so I'm wondering if there is a better way to do this. |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
One datasource - Multiple documents
The approach you use used to work fine as long as the letters were
sufficiently similar (same page layout, maybe the same headers/footers etc.) and indeed is suggested in an article in Microsoft's Knowledgebase. It may work fine after the upgrade to Word 2003, in which case I would not change it. However, over time, there have been changes to INCLUDETEXT (some of them for security reasons, and others for no apparent reason at all) and so I would check your output very thoroughly in Word 2003. Out of the box, Word 2003 does not offer a new improved way to do MailMerge (indeed, many people think the old ways are better). A few things to pay attention to: a. By default, Word 2003 connects to data sources such as Excel using OLEDB rather than DDE (or ODBC). That can sometimes cause problems, either because you do not get the same records as before, or because items such as dates and amounts may not be formatted as you expect. Graham Mayor has a wealth of info. on his website about these issues - I would have a quick look through his site at http://www.gmayor.com b. if your letters rely on "suppress blank lines", e.g. to remove blank lines in addresses, this will probably not work any more. It only works if the fields are not included in other fields such as INCLUDETEXT or IF. If you need to do that, you will probably have to redo the way you do all your addresses (Graham has info. on this - all I would suggest is that you redesign the way you do your address, if necessary, once, then copy it to all your letters. I'm not sure if Graham mentions the new \b and \f switches that can help in this area). c. you may find that {IF {MERGEFIELD LETTER_CODE} = "AA" "{INCLUDETEXT AA.DOC}" ""}. causes problems and that { INCLUDETEXT "{MERGEFIELD LETTER_CODE}.DOC" } works better, as long as every letter code corresponds to a document name. You may also have to uncheck Word Tools|Options|General|Web options|Files|Update links on save. If you decide to redesign your letters, you will probably come across at least two new Word fields - ADDRESSBLOCK and GREETINGLINE. They may work for you, particularly if you are in the U.S., but I would test carefully before moving away from using individual fields for those items. If you find that your INCLUDETEXT approach does not work as well as you need, in Word there's only one way you can really go and that's have one separate merge for each document, setting the sort/filter options for each document to pick up the relevant records from the data source. In that case, you might find it useful to automate the running of those 50 merges using a bit of VBA. (Actually, Word 2003 does come with one other way you could do a merge and that's to apply an XSL transform to your Word. Personally, I wouldn't go there unless you are very technically-minded and love improbably difficult challenges for their own sake :-) ) Peter Jamieson "sfinkboner" wrote in message ... I have a merge that is one datasource, but has multiple types of letters that need to be printed. Each letter is represented by an individual code (EX: AA) Everytime my datasource includes letter_code AA, I want the text from letter AA to print. I have about 50 different letter codes. Merge may not be the best way to do this, and I'm open to suggestions on how to handle this. I currently have the main letter set up as {IF {MERGEFIELD LETTER_CODE} = "AA" "{INCLUDETEXT AA.DOC}" ""}. Is there a better/easier way to do this? I've also just upgraded from an old version of office (I believe it was Office 2000) to Office 2003 and have to redo the main merge letter, so I'm wondering if there is a better way to do this. |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
One datasource - Multiple documents
Is there a way to do this where, if a mergefield contains a certain word you
can use includetext or can it only be the equal to, not equal to, great than, less than etc operators. I know you can do this with a query but then it doesn't work for doing multiple documents at once. "Peter Jamieson" wrote: The approach you use used to work fine as long as the letters were sufficiently similar (same page layout, maybe the same headers/footers etc.) and indeed is suggested in an article in Microsoft's Knowledgebase. It may work fine after the upgrade to Word 2003, in which case I would not change it. However, over time, there have been changes to INCLUDETEXT (some of them for security reasons, and others for no apparent reason at all) and so I would check your output very thoroughly in Word 2003. Out of the box, Word 2003 does not offer a new improved way to do MailMerge (indeed, many people think the old ways are better). A few things to pay attention to: a. By default, Word 2003 connects to data sources such as Excel using OLEDB rather than DDE (or ODBC). That can sometimes cause problems, either because you do not get the same records as before, or because items such as dates and amounts may not be formatted as you expect. Graham Mayor has a wealth of info. on his website about these issues - I would have a quick look through his site at http://www.gmayor.com b. if your letters rely on "suppress blank lines", e.g. to remove blank lines in addresses, this will probably not work any more. It only works if the fields are not included in other fields such as INCLUDETEXT or IF. If you need to do that, you will probably have to redo the way you do all your addresses (Graham has info. on this - all I would suggest is that you redesign the way you do your address, if necessary, once, then copy it to all your letters. I'm not sure if Graham mentions the new \b and \f switches that can help in this area). c. you may find that {IF {MERGEFIELD LETTER_CODE} = "AA" "{INCLUDETEXT AA.DOC}" ""}. causes problems and that { INCLUDETEXT "{MERGEFIELD LETTER_CODE}.DOC" } works better, as long as every letter code corresponds to a document name. You may also have to uncheck Word Tools|Options|General|Web options|Files|Update links on save. If you decide to redesign your letters, you will probably come across at least two new Word fields - ADDRESSBLOCK and GREETINGLINE. They may work for you, particularly if you are in the U.S., but I would test carefully before moving away from using individual fields for those items. If you find that your INCLUDETEXT approach does not work as well as you need, in Word there's only one way you can really go and that's have one separate merge for each document, setting the sort/filter options for each document to pick up the relevant records from the data source. In that case, you might find it useful to automate the running of those 50 merges using a bit of VBA. (Actually, Word 2003 does come with one other way you could do a merge and that's to apply an XSL transform to your Word. Personally, I wouldn't go there unless you are very technically-minded and love improbably difficult challenges for their own sake :-) ) Peter Jamieson "sfinkboner" wrote in message ... I have a merge that is one datasource, but has multiple types of letters that need to be printed. Each letter is represented by an individual code (EX: AA) Everytime my datasource includes letter_code AA, I want the text from letter AA to print. I have about 50 different letter codes. Merge may not be the best way to do this, and I'm open to suggestions on how to handle this. I currently have the main letter set up as {IF {MERGEFIELD LETTER_CODE} = "AA" "{INCLUDETEXT AA.DOC}" ""}. Is there a better/easier way to do this? I've also just upgraded from an old version of office (I believe it was Office 2000) to Office 2003 and have to redo the main merge letter, so I'm wondering if there is a better way to do this. |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
One datasource - Multiple documents
Is there a way to do this where, if a mergefield contains a certain word
you can use includetext or can it only be the equal to, not equal to, great than, less than etc operators. I don't think you'll be able to do that using Word's basic field language, for two reasons: a. there's no "contains" type operator in the Word "field" language, e.g. you can't use { IF { MERGEFIELD abc } contains "summat" "do this" "do that" } The best you can do is catch words at the beginning or end of the field (but not both) using wildcards, e.g. { IF { MERGEFIELD abc } = "summat*" "do this" "do that" } b. using a construct like { IF { MERGEFIELD xyz } = "something" "{ INCLUDETEXT blah }" "" } tends to cause problems anyway, which is why { INCLUDETEXT "some expression" } is preferable. I know you can do this with a query but then it doesn't work for doing multiple documents at once. Assuming that you mean 'I can write a query that selects records where fieldx contains "summat", then another one which contains "nobbut", and so on' then that's true. But what if you can write a query (which you would probably have to store in Access rather than issue from Word) which returns information for each row in the underlying table that tells Word exactly which document to merge? That may not be straightforward, but it may also be feasible. An alternative is to use a ( DATABASE ) field in Word to implement a "contains" function in some way. I can make suggestions about how to do that, but I have to say that if it can be done that way, I /think/ it should be possible to construct an Access query to do it. Peter Jamieson "jcl" wrote in message ... Is there a way to do this where, if a mergefield contains a certain word you can use includetext or can it only be the equal to, not equal to, great than, less than etc operators. I know you can do this with a query but then it doesn't work for doing multiple documents at once. "Peter Jamieson" wrote: The approach you use used to work fine as long as the letters were sufficiently similar (same page layout, maybe the same headers/footers etc.) and indeed is suggested in an article in Microsoft's Knowledgebase. It may work fine after the upgrade to Word 2003, in which case I would not change it. However, over time, there have been changes to INCLUDETEXT (some of them for security reasons, and others for no apparent reason at all) and so I would check your output very thoroughly in Word 2003. Out of the box, Word 2003 does not offer a new improved way to do MailMerge (indeed, many people think the old ways are better). A few things to pay attention to: a. By default, Word 2003 connects to data sources such as Excel using OLEDB rather than DDE (or ODBC). That can sometimes cause problems, either because you do not get the same records as before, or because items such as dates and amounts may not be formatted as you expect. Graham Mayor has a wealth of info. on his website about these issues - I would have a quick look through his site at http://www.gmayor.com b. if your letters rely on "suppress blank lines", e.g. to remove blank lines in addresses, this will probably not work any more. It only works if the fields are not included in other fields such as INCLUDETEXT or IF. If you need to do that, you will probably have to redo the way you do all your addresses (Graham has info. on this - all I would suggest is that you redesign the way you do your address, if necessary, once, then copy it to all your letters. I'm not sure if Graham mentions the new \b and \f switches that can help in this area). c. you may find that {IF {MERGEFIELD LETTER_CODE} = "AA" "{INCLUDETEXT AA.DOC}" ""}. causes problems and that { INCLUDETEXT "{MERGEFIELD LETTER_CODE}.DOC" } works better, as long as every letter code corresponds to a document name. You may also have to uncheck Word Tools|Options|General|Web options|Files|Update links on save. If you decide to redesign your letters, you will probably come across at least two new Word fields - ADDRESSBLOCK and GREETINGLINE. They may work for you, particularly if you are in the U.S., but I would test carefully before moving away from using individual fields for those items. If you find that your INCLUDETEXT approach does not work as well as you need, in Word there's only one way you can really go and that's have one separate merge for each document, setting the sort/filter options for each document to pick up the relevant records from the data source. In that case, you might find it useful to automate the running of those 50 merges using a bit of VBA. (Actually, Word 2003 does come with one other way you could do a merge and that's to apply an XSL transform to your Word. Personally, I wouldn't go there unless you are very technically-minded and love improbably difficult challenges for their own sake :-) ) Peter Jamieson "sfinkboner" wrote in message ... I have a merge that is one datasource, but has multiple types of letters that need to be printed. Each letter is represented by an individual code (EX: AA) Everytime my datasource includes letter_code AA, I want the text from letter AA to print. I have about 50 different letter codes. Merge may not be the best way to do this, and I'm open to suggestions on how to handle this. I currently have the main letter set up as {IF {MERGEFIELD LETTER_CODE} = "AA" "{INCLUDETEXT AA.DOC}" ""}. Is there a better/easier way to do this? I've also just upgraded from an old version of office (I believe it was Office 2000) to Office 2003 and have to redo the main merge letter, so I'm wondering if there is a better way to do this. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Viewing multiple Word Documents in succession | Microsoft Word Help | |||
Variable Use in Multiple Documents | Microsoft Word Help | |||
Can I generate a table of contents in multiple documents? | Microsoft Word Help | |||
Can I create an index that spans multiple, related documents? | Microsoft Word Help | |||
Table of Contents for Multiple Documents | Tables |