Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Multiple ouputs from merge
My business deals with 4 different types of clients and I want to send a
different mailmerge letter to each client. I have written a letter with some common text and the parts of the letter that are different for each client type I have in separate bookmarks in another document. Each different type of client is identified by a field called orgtype. The logic of the program is quite simple - a nested if statement. My difficulty is as part of the true condition I insert {INCLUDETEXT "C:\\My Documents\\[Business Name]\\Marketing\\clientdata.doc" [Bookmark]} and end up with an invalid file name error. HELP |
#2
|
|||
|
|||
It is difficult to troubleshoot a conditional field if you don't post the
whole code - and what are the bits in square brackets? Are they supposed to be fields or are they simply to disguise a client? And what's the nesting for? The simplest plan would be to set either the bookmark names to match the orgtype field content or to use orgtype to reflect the path. You don't need the further complication of a conditional field. e.g {INCLUDETEXT "C:\\My Documents\\{mergefield orgtype}\\Marketing\\clientdata.doc" Bookmarkname} or {INCLUDETEXT "C:\\My Documents\\Clientname\\Marketing\\clientdata.doc" {Mergefield Orgtype}} You will need to toggle the display to show the field result and update the field before merging to a new document, or you will get a file or bookmark error message (which you report that you are getting). -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Smokey smith wrote: My business deals with 4 different types of clients and I want to send a different mailmerge letter to each client. I have written a letter with some common text and the parts of the letter that are different for each client type I have in separate bookmarks in another document. Each different type of client is identified by a field called orgtype. The logic of the program is quite simple - a nested if statement. My difficulty is as part of the true condition I insert {INCLUDETEXT "C:\\My Documents\\[Business Name]\\Marketing\\clientdata.doc" [Bookmark]} and end up with an invalid file name error. HELP |
#3
|
|||
|
|||
Graham
Thankyou for your response. I am sorry for not providing sufficient detail. My business deals with schools (1); Kindergartens(2); Child Care centres(3); and Age Care(4). Each of these businesses are identifed in a field called "orgtype" What I want is to be able to give a different letter for each client type when I run the mail merge. The Bookmarks are stored in a separate document. As I said the logic of the program is quite simple: {if {mergefield orgtype} = 1 {includetext"C:\\Business\\Marketing\\marketing letter.doc" Schools} {if {mergefield orgtype} = 2 {includetext"C:\\Business\\Marketing\\marketing letter.doc" Kindergartens}{if {mergefield orgtype} = 3 {includetext"C:\\Business\\Marketing\\marketing letter.doc" Child Care Centres} includetext"C:\\Business\\Marketing\\marketing letter.doc" Age Care} Even after updating the field and toggling the field codes I still get the error. I hope this extra information assists in understanding my issues. Peter "Smokey smith" wrote: My business deals with 4 different types of clients and I want to send a different mailmerge letter to each client. I have written a letter with some common text and the parts of the letter that are different for each client type I have in separate bookmarks in another document. Each different type of client is identified by a field called orgtype. The logic of the program is quite simple - a nested if statement. My difficulty is as part of the true condition I insert {INCLUDETEXT "C:\\My Documents\\[Business Name]\\Marketing\\clientdata.doc" [Bookmark]} and end up with an invalid file name error. HELP |
#4
|
|||
|
|||
The most obvious failing I can see is that you have illegal bookmark names.
You cannot name a bookmark with spaces. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Smokey smith wrote: Graham Thankyou for your response. I am sorry for not providing sufficient detail. My business deals with schools (1); Kindergartens(2); Child Care centres(3); and Age Care(4). Each of these businesses are identifed in a field called "orgtype" What I want is to be able to give a different letter for each client type when I run the mail merge. The Bookmarks are stored in a separate document. As I said the logic of the program is quite simple: {if {mergefield orgtype} = 1 {includetext"C:\\Business\\Marketing\\marketing letter.doc" Schools} {if {mergefield orgtype} = 2 {includetext"C:\\Business\\Marketing\\marketing letter.doc" Kindergartens}{if {mergefield orgtype} = 3 {includetext"C:\\Business\\Marketing\\marketing letter.doc" Child Care Centres} includetext"C:\\Business\\Marketing\\marketing letter.doc" Age Care} Even after updating the field and toggling the field codes I still get the error. I hope this extra information assists in understanding my issues. Peter "Smokey smith" wrote: My business deals with 4 different types of clients and I want to send a different mailmerge letter to each client. I have written a letter with some common text and the parts of the letter that are different for each client type I have in separate bookmarks in another document. Each different type of client is identified by a field called orgtype. The logic of the program is quite simple - a nested if statement. My difficulty is as part of the true condition I insert {INCLUDETEXT "C:\\My Documents\\[Business Name]\\Marketing\\clientdata.doc" [Bookmark]} and end up with an invalid file name error. HELP |
#5
|
|||
|
|||
Graham
Your assistance is greatly appreciated! I have changed the bookmark names and ensure that they match with the names that are stored in the document and still get the error. Do you have any further ideas? Peter "Graham Mayor" wrote: It is difficult to troubleshoot a conditional field if you don't post the whole code - and what are the bits in square brackets? Are they supposed to be fields or are they simply to disguise a client? And what's the nesting for? The simplest plan would be to set either the bookmark names to match the orgtype field content or to use orgtype to reflect the path. You don't need the further complication of a conditional field. e.g {INCLUDETEXT "C:\\My Documents\\{mergefield orgtype}\\Marketing\\clientdata.doc" Bookmarkname} or {INCLUDETEXT "C:\\My Documents\\Clientname\\Marketing\\clientdata.doc" {Mergefield Orgtype}} You will need to toggle the display to show the field result and update the field before merging to a new document, or you will get a file or bookmark error message (which you report that you are getting). -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Smokey smith wrote: My business deals with 4 different types of clients and I want to send a different mailmerge letter to each client. I have written a letter with some common text and the parts of the letter that are different for each client type I have in separate bookmarks in another document. Each different type of client is identified by a field called orgtype. The logic of the program is quite simple - a nested if statement. My difficulty is as part of the true condition I insert {INCLUDETEXT "C:\\My Documents\\[Business Name]\\Marketing\\clientdata.doc" [Bookmark]} and end up with an invalid file name error. HELP |
#6
|
|||
|
|||
Sorry, not at the moment.
I would ask you to post the document(s) but I am about to leave for the airport as I am relocating to Cyprus today, and I may be off line for a while as I will only have a poor dial-up connection to contend with until I can get the local telecom company sorted out. Without looking at the exact codes you are posting and what they are supposed to gather it is difficult to spot where the error lies. Test it by creating a document containing your standard texts. Mark the standard texts as legitimate bookmarks and save that document. Then try using the includetext without reference to mergefield to insert those texts into a document. If that all works, broaden it out to selectively pick the texts according to the merge data as originally suggested. Until I am re-established, this is the best I can offer. Sorry -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Smokey smith wrote: Graham Your assistance is greatly appreciated! I have changed the bookmark names and ensure that they match with the names that are stored in the document and still get the error. Do you have any further ideas? Peter "Graham Mayor" wrote: It is difficult to troubleshoot a conditional field if you don't post the whole code - and what are the bits in square brackets? Are they supposed to be fields or are they simply to disguise a client? And what's the nesting for? The simplest plan would be to set either the bookmark names to match the orgtype field content or to use orgtype to reflect the path. You don't need the further complication of a conditional field. e.g {INCLUDETEXT "C:\\My Documents\\{mergefield orgtype}\\Marketing\\clientdata.doc" Bookmarkname} or {INCLUDETEXT "C:\\My Documents\\Clientname\\Marketing\\clientdata.doc" {Mergefield Orgtype}} You will need to toggle the display to show the field result and update the field before merging to a new document, or you will get a file or bookmark error message (which you report that you are getting). -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Smokey smith wrote: My business deals with 4 different types of clients and I want to send a different mailmerge letter to each client. I have written a letter with some common text and the parts of the letter that are different for each client type I have in separate bookmarks in another document. Each different type of client is identified by a field called orgtype. The logic of the program is quite simple - a nested if statement. My difficulty is as part of the true condition I insert {INCLUDETEXT "C:\\My Documents\\[Business Name]\\Marketing\\clientdata.doc" [Bookmark]} and end up with an invalid file name error. HELP |
#7
|
|||
|
|||
Graham
Thank you for what you have done. I will implement your suggestions. Good luck with the move. Peter "Graham Mayor" wrote: Sorry, not at the moment. I would ask you to post the document(s) but I am about to leave for the airport as I am relocating to Cyprus today, and I may be off line for a while as I will only have a poor dial-up connection to contend with until I can get the local telecom company sorted out. Without looking at the exact codes you are posting and what they are supposed to gather it is difficult to spot where the error lies. Test it by creating a document containing your standard texts. Mark the standard texts as legitimate bookmarks and save that document. Then try using the includetext without reference to mergefield to insert those texts into a document. If that all works, broaden it out to selectively pick the texts according to the merge data as originally suggested. Until I am re-established, this is the best I can offer. Sorry -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Smokey smith wrote: Graham Your assistance is greatly appreciated! I have changed the bookmark names and ensure that they match with the names that are stored in the document and still get the error. Do you have any further ideas? Peter "Graham Mayor" wrote: It is difficult to troubleshoot a conditional field if you don't post the whole code - and what are the bits in square brackets? Are they supposed to be fields or are they simply to disguise a client? And what's the nesting for? The simplest plan would be to set either the bookmark names to match the orgtype field content or to use orgtype to reflect the path. You don't need the further complication of a conditional field. e.g {INCLUDETEXT "C:\\My Documents\\{mergefield orgtype}\\Marketing\\clientdata.doc" Bookmarkname} or {INCLUDETEXT "C:\\My Documents\\Clientname\\Marketing\\clientdata.doc" {Mergefield Orgtype}} You will need to toggle the display to show the field result and update the field before merging to a new document, or you will get a file or bookmark error message (which you report that you are getting). -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Smokey smith wrote: My business deals with 4 different types of clients and I want to send a different mailmerge letter to each client. I have written a letter with some common text and the parts of the letter that are different for each client type I have in separate bookmarks in another document. Each different type of client is identified by a field called orgtype. The logic of the program is quite simple - a nested if statement. My difficulty is as part of the true condition I insert {INCLUDETEXT "C:\\My Documents\\[Business Name]\\Marketing\\clientdata.doc" [Bookmark]} and end up with an invalid file name error. HELP |
#8
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Multiple ouputs from merge
Here is what I did:
With that particular code, I inserted an IF statement with the condition = "youralphnumericvariable". Next I put in the Includetext field and the file path and name, with each particular code having it's own separate file. There were no bookmarks needed. Granted there were several smaller files, but the solution worked for me. Ameobia "Graham Mayor" wrote: The most obvious failing I can see is that you have illegal bookmark names. You cannot name a bookmark with spaces. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Smokey smith wrote: Graham Thankyou for your response. I am sorry for not providing sufficient detail. My business deals with schools (1); Kindergartens(2); Child Care centres(3); and Age Care(4). Each of these businesses are identifed in a field called "orgtype" What I want is to be able to give a different letter for each client type when I run the mail merge. The Bookmarks are stored in a separate document. As I said the logic of the program is quite simple: {if {mergefield orgtype} = 1 {includetext"C:\\Business\\Marketing\\marketing letter.doc" Schools} {if {mergefield orgtype} = 2 {includetext"C:\\Business\\Marketing\\marketing letter.doc" Kindergartens}{if {mergefield orgtype} = 3 {includetext"C:\\Business\\Marketing\\marketing letter.doc" Child Care Centres} includetext"C:\\Business\\Marketing\\marketing letter.doc" Age Care} Even after updating the field and toggling the field codes I still get the error. I hope this extra information assists in understanding my issues. Peter "Smokey smith" wrote: My business deals with 4 different types of clients and I want to send a different mailmerge letter to each client. I have written a letter with some common text and the parts of the letter that are different for each client type I have in separate bookmarks in another document. Each different type of client is identified by a field called orgtype. The logic of the program is quite simple - a nested if statement. My difficulty is as part of the true condition I insert {INCLUDETEXT "C:\\My Documents\\[Business Name]\\Marketing\\clientdata.doc" [Bookmark]} and end up with an invalid file name error. HELP |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sending Mail Merge to Email to Multiple Recipients in the Same Mes | Mailmerge | |||
Query a mail merge for multiple letters at once? | Mailmerge | |||
Multiple merge with IncludeText generating extraneous hidden chara | Mailmerge | |||
Need multiple Ifs in Merge Fields | Mailmerge | |||
Merge multiple documents? | New Users |