![]() |
|
|
|
#1
|
|||
|
|||
|
Hello,
I am a very bigninner in Word VBA. I would like to code something to help me merge multiple Word documents in one only Word file, with the "MergeDocuments". But "Mergedocuments" doesn't work for me : Code:
Application.MergeDocuments OriginalDocument:=Documents("Part1A.docx"), _
RevisedDocument:=Documents("Part2.docx"), Destination:= _
wdCompareDestinationNew, Granularity:=wdGranularityWordLevel, _
CompareFormatting:=True, CompareCaseChanges:=True, CompareWhitespace:= _
True, CompareTables:=True, CompareHeaders:=True, CompareFootnotes:=True, _
CompareTextboxes:=True, CompareFields:=True, CompareComments:=True, _
CompareMoves:=True, OriginalAuthor:="GD", RevisedAuthor:= _
"GD", FormatFrom:=wdMergeFormatFromPrompt
Could you help me please ? Thanks |
|
#2
|
||||
|
||||
|
The 4160 error message includes a sentence telling you you've supplied a bad filename. That's because you need to supply the full path, as well, for both files.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
|||
|
|||
|
Quote:
Thank you for your help. |
|
#4
|
||||
|
||||
|
Not so. As I already said, you need to supply the full path, not just the filename.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
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 |
| How to merge track changes from 2 documents | jbz | Word | 1 | 09-18-2015 01:30 PM |
Merge info into 5 separate documents
|
kenjmaraty | Word | 3 | 07-06-2015 07:30 AM |
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 |