Open word doc from excel

pld60

Registered User.
Local time
Today, 18:08
Joined
Mar 22, 2016
Messages
20
I have a command button on an excel spreadsheet to open a word document with this code.
Code:
Private Sub CommandButton1_Click()
         Dim objWord As Object
     Set objWord = CreateObject("Word.Application")
      objWord.Visible = True
      objWord.Documents.Open "H:\Spreadsheets\400 Book\400 Book help.docx"
 End Sub
This works great opens the proper document, but is not the active document. I would like when you click that you see the word document.
 
arnelgp, thanks that works great!!!!
 

Users who are viewing this thread

Back
Top Bottom