VBA to add final touches to merged document, after running MailMergeToDoc script
Hi
Thanks to macropod's helpful mail merge instructions/tutorial on this forum, I have successfully built a directory mail merge using data from an Excel spreadsheet. This merge is basically taking the data out of the Excel spreadsheet and merging it with a series of grouped tables in Word formatted in a much more presentable manner. Macropod's MailMergeToDoc script is set to run automatically once the merge has finished, to remove the blank rows.
In an ideal world, I would like to expand on this script but have no real knowledge of VBA and was wondering if I could ask for some assistance.
What I would like to achieve is that once the MailMergeToDoc script has finished, the following happens automatically:
1. A Section break is added at the beginning of the document and at the end of the document, with 1cm margins Top, Bottom, Left and Right, and the Headers/Footers set to 0.5cm from edge. The headers/footers for the cover pages are blank, so the header/footer settings for these two sections should not be linked to the previous.
3. A custom cover page named 'Front Cover' is added to the first page (Section 1) . This cover page has been included as a Custom Cover Page Building Block, in the Category 'Schedules' within the template that is attached to the merged document.
4. A different custom cover page, named 'Back Cover' is added to the last page of the document (Section 3). Again, this building block is saved in the 'Schedules' Category that I have created in the template attached to the document.
5. In Section 2, a custom header, named 'Joint Header' and footer 'Joint Footer' is added which is not linked to the previous section
Is such a macro possible and if so, is anyone able to to assist/guide me with regards to building it?
Thank you very much in advance.
|