![]() |
|
|
|
#1
|
||||
|
||||
|
The macro is a Word macro, not coded for running from Excel. To do that with the code in post #18, you'd need to set a reference to the Word object library (via Tools|References in the VBE), change:
Dim strFolder As String, strFile As String, wdDoc As Document, i As Long to: Dim strFolder As String, strFile As String, wdApp As New Word.Application, wdDoc As Word.Document, i As Long change: Set wdDoc = Documents.Open to: Set wdDoc = wdApp.Documents.Open and change: Set wdDoc = Nothing to: Set wdApp = Nothing: Set wdDoc = Nothing To suppress link alerts, you might try inserting: wdApp.DisplayAlerts = wdAlertsNone before: While strFile <> "" and inserting: wdApp.DisplayAlerts = wdAlertsAll before: Set wdApp = Nothing: Set wdDoc = Nothing That said, it's not at all clear why you'd want to do this from Excel.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
| Tags |
| multiple files |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to open Docx files? | mond_bees | Word | 12 | 08-29-2012 03:32 AM |
convert multiple csv files to multiple excel files
|
mit | Excel | 1 | 06-14-2011 10:15 AM |
looking for macro for multiple files
|
bolk | Word | 3 | 05-03-2011 05:46 AM |
macro to pull data from multiple files
|
psrs0810 | Excel | 2 | 10-25-2010 01:49 PM |
| Icon for docx files | Jazz43 | Word | 2 | 10-20-2009 08:34 PM |