Programatically joining templates? (1 Viewer)

Spooky

Registered User.
Local time
Today, 15:06
Joined
Jun 11, 2012
Messages
18
To cut a long story short, is there a way to join a template from a VBA loop?

eg - for a simple doc, I do:

Code:
for a = 0 to x
Documents.Add Template:=sName + "file.dot"
With ActiveDocument
' add bookmark stuff etc
End with
Next x

Now, depending in the selection in the userform, they may create one or more copies of the same file.dot (with different information in each)

Rather than output multiple docs, how can I join the outputted doc as one document?

Note - this is just one of about 20 different templates in the project.
 

gerry@docshop.ie

Registered User.
Local time
Today, 22:06
Joined
Jun 19, 2013
Messages
41
Use the template file as the starting point. create separate documents for each optional section. use the INSERT -> OBJECT -> Text from File to insert other word documents. Text inserted at the cursor location. Ensure that the styles for text are identical in all documents.

Selection.InsertFile FileName:= "Path and File Name" , Range:="", ConfirmConversions:=False, Link:=False, Attachment:=False
 

Users who are viewing this thread

Top Bottom