![]() |
|
#1
|
|||
|
|||
![]() 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 get a list of country names here, but I'm not sure why you would need it. |
#2
|
|||
|
|||
![]()
Hi d4okeefe,
thanks for replying. Yes i want 2 docs to be searched and results to be shown in a new doc with 2 columns for comparison. The macro should be a "Search and Extract" for text in () and countries listed in both Doc 1 and Doc 2, thats why I need to integrate a list of countries into the macro but I dont know where and how. Its important that entries sould be extracted and combined in order of appearance in both docs. I hope it's clear. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
glnz | Word VBA | 8 | 09-07-2022 02:09 PM |
How to extract names from a list | flyoverrunner | Excel | 3 | 06-06-2018 04:54 AM |
![]() |
jhy001 | Word | 4 | 11-06-2017 02:08 PM |
![]() |
Dante49 | Word | 2 | 10-24-2016 01:53 PM |
![]() |
Maxwell314 | Excel | 3 | 12-08-2014 06:17 PM |