open up a word document in excel

  • Thread starter Thread starter john.9.williams
  • Start date Start date
J

john.9.williams

Hi,

I need to know weather its possible to dispaly the contents of a word
document within a userform, if this is not possible whats is the code
for opening up a word doc within excel itself.

many thanks

Johny5
 
Private Sub OpenWordDocumentButton_Click()
Dim wdApp As Word.Application

strFilename = "Full pathname here"

Set wdApp = CreateObject("Word.Application")

With wdApp
.Documents.Open Filename:=ThisWorkbook.Path & "\" & strFilename
.Visible = True
End With

Set wdApp = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top