Split a mail merge into multiple documents

anned -  
 anned -
Hello,

Following a mail merge, I would like to obtain as many files as there are records in my database, in .doc format, to send them to the recipient.

I tried using Patricia Angelslight's macro (thanks to her for her clear explanations!
https://www.youtube.com/watch?v=bglUfRd2JhY
But it doesn’t run on my PC. Nothing happens when I launch the macro on my file containing all the mail merge.
Note: I couldn't "enable all macros" in the macro settings because I’m blocked by my company’s security :-(

Thank you for your help!

Configuration: Windows / Internet Explorer 11.0

4 réponses

m@rina Posted messages 27234 Registration date   Status Modérateur Last intervention   11 543
 
0
anned
 
Hello,

Thank you. I just tried this macro, but it crashes on the r.copy after the first record (in which I only have blank pages).
It seems that it can't find anything to copy!!!!
0
m@rina Posted messages 27234 Registration date   Status Modérateur Last intervention   11 543
 
Where did you put the macro? And is the active document indeed the result of the mail merge?
0
anned
 
I put it in my macros (normal.dot)
and yes, the active document is indeed the result of the mail merge. I added a section break to my mail merge template at the end of the document.

Is this the right way to do it?
0
anned
 
I’m making progress! I just retook the test by removing the section break I had added at the end of my template document, and I now have as many documents as records, this time, and they are not empty!

However, each document contains the result of the mail merge and the version of the mail merge with the merge field codes (meaning each merged document appears twice: once with the enriched variables, and once with the variable names).

Moreover, upon opening, Word asks me if I want to execute the SQL command to link the document to my database.

Do you have any ideas on how to fix this?
0