Using an Excel macro to open a Word File
In my opinion, neither: use automation with the Word object library. Add the
reference to Word to your project and then:
Dim WordApp as Word.Application
Dim WordDoc as Word.Document
Set WordApp = New Word.Application
Set WordDoc = WordApp.Documents.Open("C:\Blah\Blah\MyDoc.doc")
....
WordDoc.Close
WordApp.Quit
--
- K Dales
"lhyer" wrote:
Can someone please help me with an example of what the code would look like
to open a Word file from a macro in Excel? Is it better to use the shell or
the createobject function?
|