I am sorry but I really don't understand how this is a tutorial. I still don't know how to add the actual code to the word doc, where is step 0?, how or where do I select a key?
What am i missing?
jos
I am sorry but I really don't understand how this is a tutorial. I still don't know how to add the actual code to the word doc, where is step 0?, how or where do I select a key?
What am i missing?
jos
Hi jos,
The tutorial explains that ... on page 1.
Cheers,
Paul Edstein
[MS MVP - Word]
Great tutorial thanks. I am having trouble with email part. I have tried to follow the steps but no email generated. I changed to wdSendToNewDocument and also no new document created.
I have attached my documents and would appreciate if you could share some light where I have done wrong.
Oh, I have to change Private Sub to Sub as the Macro will not proceed. Can this be the problem??
Thank you so much.![]()
The only macro you should be running is the one named 'RunMerge'. There is no need to make any changes to the macro code. As the tutorial clearly states:
Your 'Email Merge Main Document' also has none of the field coding described in the tutorial. The 'DATA' field in your 'Email Merge Main Document' is not constructed correctly (it's a mergefield and, so, should be coded as {MERGEFIELD DATA}) and should be in your 'EmailDataSource' document. The field coding that should be in your 'Email Merge Main Document' is instead found in your 'EmailDataSource' document.The ‘RunMerge’ macro takes care of the whole process, executing a Directory/Catalog merge on the raw data to consolidate the groups, then taking the consolidated data and executing an e mail merge to generate the e mails.
Cheers,
Paul Edstein
[MS MVP - Word]
Thanks for the quick response. As I am a newbie for this, sorry, would it be possible to have a sample of 'Email Merge Main Document' and 'EmailDataSource'? I am really struggle and confused to figure out how construct it.
Thank you very much.![]()
You could rename your 'EmailDataSource' document to 'Email Merge Main Document', then create a new 'EmailDataSource' document that has nothing more than copies of the «Data» and «Recipient» fields from the tutorial.
Cheers,
Paul Edstein
[MS MVP - Word]
Hi, thanks for the tutorial sharing. Unfortunately, looks like I unable to get the final result as per the guideline by using my own scenario.
Kindly refer to my attached files, as indicated by the file name, the xls is the datasource I used, the mailmerge document is my work around and the desired result is the sample result I type in manually. I need to print the letter with a criteria of page break by Holder field. Kindly advice, thanks.![]()
Hi Autumncicada,
Your mailmerge main document isn't constructed anything like the examples in the tutorial, for which you need to use field coding based on the 'Calculating Group and Sub-Group Totals' topic and after which you can run the macro in the 'Merging to Tables' topic.
Cheers,
Paul Edstein
[MS MVP - Word]
Hi, I tried to copy the exact code as per the tutorial and paste it to mailmerge document, but I am unable to get the result as shown in tutorial (attached with screen shots). May I know is there any setting I have overlooked?
Thanks.![]()
If you navigate to the 'Calculating Group and Sub-Group Totals' topic, select the field and press Alt-F9, you'll see the complete field code. That's what you need to copy & paste, then modify to suit your specific needs. It doesn't seem you'd done that for the mailmerge main document you attached to your previous post.
Cheers,
Paul Edstein
[MS MVP - Word]
Hi, can you advice how to determine which is sub-group? As I am only plan to use Holder column as the main key. Many thanks![]()
Thanks. It worked. Many thanks.
Hi, thanks a lot for the help. I tried to run the merge and check the result, notice that the contents of the last page does not showing the respective paragraph. May I know why? Attached with the result. Thanks
As described in the tutorial, you need to add a dummy data row with a '0' for the last row of the Holder column.
Cheers,
Paul Edstein
[MS MVP - Word]