View Single Post
 
Old 06-28-2018, 12:23 PM
d4okeefe d4okeefe is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: Apr 2013
Posts: 77
d4okeefe is on a distinguished road
Default

The sub that you pasted pretty much does what you want, right? It accounts for 2 documents, the first one that you search, and the second one the code creates, and that you paste to. If you want to search 2 existing documents, open them by their file locations rather than using ActiveDocument:

Code:
Sub open_docs()
    Dim doc_name1 As String
    Dim doc1 As Document
    doc_name1 = "c:\[location]\Doc1.docx"
    Set doc1 = Documents.Open(doc_name1)
    
    Dim doc_name2 As String
    Dim doc2 As Document
    doc_name1 = "c:\[location]\Doc2.docx"
    Set doc2 = Documents.Open(doc_name1)
End Sub
You can then access the range objects of both "doc1" and "doc2".

You can get a list of country names here, but I'm not sure why you would need it.
Reply With Quote