Combining to 2 word documents into 1

b_karv

Registered User.
Local time
Today, 11:06
Joined
Sep 15, 2004
Messages
31
Combining 2 word documents into 1

I am probally asking the impossible but worth a shot.

I am currently mail merging from access (using VB code) data to 2 different letters. I am wandering if it is possible after doing the mailmerges to then combine these 2 seperate word documents into 1 word document?

Here is my current mailmerging code:

objword = Null
Set objword = GetObject("C:\WordDocuments\" & filename, "Word.Document")
objword.Application.Visible = True
objword.MailMerge.OpenDataSource _
Name:="C:\AccessDatabase.mdb", _
LinkToSource:=True, _
Connection:="TABLE tbl_Data_Temp_AutoPrint", _
SQLStatement:="SELECT * FROM [tbl_Data_Temp_AutoPrint]"
objword.MailMerge.Execute
objword.Close


Thanks for the advice

Kind Regards,

Karv
 
Last edited:
What about having a seperate Word doc with two INLUDETEXT fields pointing to your 2 new mailmerge docs?
 
Hey first of all thanks. But would you be able to elaborate on this?

Also is it possible via VB code to save the merged document as a specific file name?
 
Actually I figured out how to do the INSERT TEXT thing.

But does anyone how I would modify the code below so that I can save the newly merged document to a specific filename???Cheers Karv


objword = Null
Set objword = GetObject("C:\WordDocuments\" & filename, "Word.Document")
objword.Application.Visible = True
objword.MailMerge.OpenDataSource _
Name:="C:\AccessDatabase.mdb", _
LinkToSource:=True, _
Connection:="TABLE tbl_Data_Temp_AutoPrint", _
SQLStatement:="SELECT * FROM [tbl_Data_Temp_AutoPrint]"
objword.MailMerge.Execute
objword.Close
 

Users who are viewing this thread

Back
Top Bottom