View Single Post
 
Old 11-20-2017, 10:09 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Your use of the term 'merge' may be confusing. I suspect this is not a mail merge?

Your process accesses just one document

Code:
With ActiveDocument
    .Bookmarks("Renew1").Range _
            .InsertBefore (Cbrenew)
    .Bookmarks("Renew2").Range _
            .InsertBefore (Cbrenew)
    .Bookmarks("Renew3").Range _
            .InsertBefore (Cbrenew)
End With
If you want it to access more documents, you need to open each document in turn (or create new documents from a template) and apply the data to each.

Depending on what you are doing with these documents, you could instead use the one document and use a loop to apply the data four times saving with a different name between each. However in order to do that you would have to write to the bookmark and not next to it. A simple way to do that would be to add and call the FillBM function which is listed on my web site at http://www.gmayor.com/word_vba_examples.htm.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote