Tech Support Guy banner
  • Please post in our Community Feedback thread for help with the new forum software! If you are having trouble logging in, please Contact Us for assistance.
Status
Not open for further replies.
1 - 4 of 4 Posts

·
Registered
Joined
·
680 Posts
If your going to open the same word doc everytime you press the button you could try

Dim LWordDoc As String
Dim oApp As Object
'Path to the word document
LWordDoc = "c:\Doc1.doc"
If Dir(LWordDoc) = "" Then
MsgBox "Document not found."
Else
'Create an instance of MS Word
Set oApp = CreateObject(Class:="Word.Application")
oApp.Visible = True
'Open the Document
oApp.Documents.Open filename:=LWordDoc
End If
End Sub

You will need to put in the correct file path of the document you want to open.
 

·
Registered
Joined
·
356 Posts
Discussion Starter · #4 ·
Thanks Guy's I found a solution:

Private Sub Command30_Click()
Application.FollowHyperlink "T:\G4\Maint\Fac Reports\M2R2Weekly Planning Status xcel document\MCRD Projects\MCRD Projects Input Worksheet.doc"
End Sub
 
1 - 4 of 4 Posts
Status
Not open for further replies.
Top