#1
|
|||
|
|||
Merge two documents using VBA
I would like to import the text from another word document into the current word document
Could someone help me with the code |
#2
|
||||
|
||||
Something list this would work
Code:
Selection.InsertFile FileName:="C:\Folder\WordInput.docx", Range:="", _ ConfirmConversions:=False, Link:=False, Attachment:=False
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Thank you. How do I change the file reference so it always looks in the same directory as the base document in which the code sits
|
#4
|
||||
|
||||
The path to the current document would be
ActiveDocument.Path so you could modify the code to Code:
Selection.InsertFile FileName:=ActiveDocument.Path & "\WordInput.docx", Range:="", _ ConfirmConversions:=False, Link:=False, Attachment:=False
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
100 Primary Mail Merge Documents - want to add a table with fields to all of the primary documents | revans611 | Mail Merge | 3 | 09-15-2020 12:07 PM |
merge two documents alternatively | digiman | Word | 9 | 09-09-2020 01:00 PM |
Merge documents | coriolisss | Word VBA | 3 | 11-16-2018 03:14 PM |
Merge to Seperate Documents | joughin | Mail Merge | 1 | 05-17-2012 05:08 PM |
Merge documents | ilce | Mail Merge | 1 | 02-16-2012 02:33 PM |