-
Forget that code:
This is all you need.
[vba]
Sub M_snb()
c00=getobject("G:\OF\doc1.docx").content & getobject("G:\OF\doc2.docx").content
End Sub
[/vba]
The contents of doc1.docx and doc2.docx are being merged into the variable c00.
Since you didn't indicate what should happen next I can't give any further advice.
If you want so save a new file that contains both contents:
[vba]
Sub M_snb()
with Getobject("G:\OF\doc1.docx")
.content.insertafter getobject("G:\OF\doc2.docx").content
.saveas2 "G:\doc3.docx",12
.close False
end with
End Sub
[/vba]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules