How can I open a named Word doc from an Excel macro

  • Thread starter Thread starter Graham Davies
  • Start date Start date
G

Graham Davies

I can start Word by using Application.activatemicrosoftapp
xlmicrosoftword but this alsways opens a blank document. I
need to open an existing document to add something to it.


Any ideas??
 
This is what I use:

Dim Word As New Word.Application
Dim WordDoc As New Word.Document
Dim Doc As String

Doc = "C:\insert file path and doc name here.doc"
Set WordDoc = Word.Documents.Open(Doc)
Word.Selection.WholeStory
Word.Selection.Copy

HTH
Ed
 
Graham,

Here's an example

Dim wordApp As Object

Set wordApp = CreateObject("Word.Application")
wordApp.Documents.Open Filename:="d:\Bob\My Documents\Excel.doc"
wordApp.Visible = True
 
Back
Top