Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Mail merge to different documents
I have to do a mail merge to different documents based on 2 original
documents (french and english). I prompt for the end user to enter the french and english document names and locations of the documents for the mail merge. My question is can I set up the mail merge with the original documents but if another document is entered can I change the name of the document to be used in a macro? Also if the new document the person is using doesn't use some of the mergefields from the original mail merge will that cause problems or can this be done? I hope I am being specific enough. Any help is appreciated. HeatherO |
#2
|
|||
|
|||
I can get you part way, Heather. Yes, you can change the data source. Yes,
you can merge two documents to the same data source. You can absolutely automate it. In the Excel file, give a dropdown in column A to choose F(rench) or E(nglish). Then, record a macro of yourself running mailmerge (with query F) to the French document, then change the data source and mailmerge (query E) to the English document. Put the code in the Word document_open event so it runs as soon as you open it. Here is more code/info on automating mail merge: http://www.vbaexpress.com/kb/getarticle.php?kb_id=122 Perhaps this is enough information. ******************* ~Anne Troy www.piersontech.com www.mrexcel.com "HeatherO" wrote in message ... I have to do a mail merge to different documents based on 2 original documents (french and english). I prompt for the end user to enter the french and english document names and locations of the documents for the mail merge. My question is can I set up the mail merge with the original documents but if another document is entered can I change the name of the document to be used in a macro? Also if the new document the person is using doesn't use some of the mergefields from the original mail merge will that cause problems or can this be done? I hope I am being specific enough. Any help is appreciated. HeatherO |
#3
|
|||
|
|||
Thank you Anne. Your information is very helpful. I appreciate your help
especially with so much to learn. Thanks again. Heather "Anne Troy" wrote: I can get you part way, Heather. Yes, you can change the data source. Yes, you can merge two documents to the same data source. You can absolutely automate it. In the Excel file, give a dropdown in column A to choose F(rench) or E(nglish). Then, record a macro of yourself running mailmerge (with query F) to the French document, then change the data source and mailmerge (query E) to the English document. Put the code in the Word document_open event so it runs as soon as you open it. Here is more code/info on automating mail merge: http://www.vbaexpress.com/kb/getarticle.php?kb_id=122 Perhaps this is enough information. ******************* ~Anne Troy www.piersontech.com www.mrexcel.com "HeatherO" wrote in message ... I have to do a mail merge to different documents based on 2 original documents (french and english). I prompt for the end user to enter the french and english document names and locations of the documents for the mail merge. My question is can I set up the mail merge with the original documents but if another document is entered can I change the name of the document to be used in a macro? Also if the new document the person is using doesn't use some of the mergefields from the original mail merge will that cause problems or can this be done? I hope I am being specific enough. Any help is appreciated. HeatherO |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
mail merge with attachments | Mailmerge | |||
Mail Merge Issue With Office 97 - Excel Data Source | Mailmerge | |||
mail merge to separate documents | Microsoft Word Help | |||
Saving Mail Merge Documents Individually | Mailmerge | |||
How can you print all documents in a mail merge? | Mailmerge |