Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Catalog Mail Merge - tutorial

Status
Not open for further replies.

dmb362

MIS
Apr 8, 2014
8
US
I have worked my way thru the tutorial and it was very helpful (found here
I am near the end where you insert code into a Directory mail merge that creates an email message.

The directory/catalog EmailDataSource document is created and looks correct - in fact is just a copy of what is in the text.
The VBA code is in a normal module in this document.
The file created by the code: EmailDataSource has all the data in it it. Header rows and details rows
The correct number of emails are generated and sent
However none of the emails contain any data after the receipient and the 'column headers' ie city representative and amount

I am using the provided "Email Merge Main Document" with no changes

Any ideas what I am missing?

Thanks
 
Are you adding the RunMerge code to the tutorial's Mail Merge Main Document, and not to either Email Merge Main Document or the EmailDataSource document, as described in the tutorial? The results you're getting suggests not. Done as described in the tutorial, the emails are correctly generated, with all details.

Cheers
Paul Edstein
[MS MVP - Word]
 
This is what the tutorial says:
First, create your e mail mail-merge main document, setting it up for a normal e mail merge with whatever text you need and a field for the data......

Save this document in an appropriate folder with the name ‘Email Merge Main Document.doc’. .....

Next, set up a separate Catalog/Directory mail-merge main document, with a single paragraph containing field coding....

Instead of executing the mail-merge from either document in the normal manner, insert the following code into a normal vba code module in the above Catalog/Directory mail-merge main document, .....

then save it in the same folder as your ‘Email Merge Main Document’.


It doesn't say anything about a "Mail merge Main Document"

When I open the "Mail Merge Main Document" provided in the zip - it says to read the tutorial.

On what page or part of the tutorial is the Mail Merge Main document referring to?
What is the purpose of the Mail Merge Main Document? The VBA code doesn't work in there.
Why would I need this document when the tutorial says to create a Catalog Mail merge document and put the code there and run it from there?

 
Let me see, that would be where it says:
First, create your e mail mailmerge main document, ... Save this document in an appropriate folder with the name ‘Email Merge Main Document.doc’. I’ve included a basic version of this document in the tutorial’s zip file.

Next, set up a separate Catalog/Directory mailmerge main document, with a single paragraph containing field coding like:
Please pay close attention to what the tutorial says.

Cheers
Paul Edstein
[MS MVP - Word]
 
Continuing to the next two paras, the tutorial says:
Your Catalog/Directory mailmerge main document shouldn’t have anything else – not even an extra empty paragraph ...
Instead of executing the mailmerge from either document in the normal manner, insert the following code into a normal vba code module in the above Catalog/Directory mailmerge main document, then save it in the same folder as your ‘Email Merge Main Document’.

Cheers
Paul Edstein
[MS MVP - Word]
 
Thanks for your reply. I have done exactly what the tutorial says, using the exact coding and the sample data. Calling the files by the names specified. It does create the "data" document and sends emails. I have two separate documents. One with the email text and the filed data and the other is a catalog merge with the exact code as listed in the tutorial. The via code is added to a normal module in the catalog document.

I have not altered anything as I thought I would test the code first. I don't know where else to look in the tutorial. Sorry.
 
I have re-tested the tutorial's process since your first post and have confirmed that it works as specified. I suggest you change the output destination, as described in the tutorial, so you can confirm the email data are being generated.

Cheers
Paul Edstein
[MS MVP - Word]
 
I am using word 2013, could that have an impact?

If by the output destination, you mean set the code to generate a document instead of an email. I tried that also. Same results.

Thanks again for replying
 
I doubt that using Word 2013 has anything to do with it. The fact you're not getting anything in the output document suggests you don't have one of the other documents set up correctly. As I've already said, the process works correctly with:
(a) the mail merge main document (adding the macro to that); and
(b) the email merge main document,
that come with the tutorial when both are used as described.

Cheers
Paul Edstein
[MS MVP - Word]
 
I am getting something in the output. The text of the email part, the recipient name, formatted into upper and lower case and the "header" of the table. But none of the details. I am getting the right number of emails, addressed to the correct people. The table is being properly created as the document created by the macro exits and has the right number of email addresses, the right number of lines under the headers.

Thanks
 
See my previous reply. All indications are that you have not followed the instructions.

Cheers
Paul Edstein
[MS MVP - Word]
 
Let's just say I don't get other people complaining it doesn't work, regardless of which version of Office they use...

Cheers
Paul Edstein
[MS MVP - Word]
 
Apparently it is 2013 - when I switch to a machine with Word 2010 - the code works fine. We have another internal issue with the emailing part of it - but the at least we have narrowed the problem.
 
Maybe you have a faulty Office 2013 installation. Have you tried repairing it (via Programs & Features > Microsoft Office > Change in the Windows Control Panel)?

Cheers
Paul Edstein
[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top