In the "frontend" I have a macro linked to a button in my command bar within Word. Purpose of this button is to allow users to compare the current document with its previous version.
In the backend I have a Java EE server and Alfresco running with a few servlets. One of these servlets currently returns .doc document when given the document's name. So I just need to call it with the good name containing the version I want and it returns me the document I asked for.
So the ideal workflow for a user would be the following :
The challenging part for me is the one regarding VB6. I know that I can merge docs with ActiveDocument.Merge FileName:="path_to_file", MergeTarget:=wdMergeTargetSelected
but
Thank you for you help.
You open a document using Documents.Open
. See F1-help for help on the different options and paramteters.
Option Explicit
Sub OpenDoc()
Dim oDoc As Document
Set oDoc = Documents.Open(FileName:="FILENAME.docx")
Call oDoc.Merge("PATH-TO-OTHER-DOCUMENT.docx")
Set oDoc = Nothing
End Sub
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.