I have a piece of code to open a Word document. I would like to use the ‘current project.path’ instead of hard coding the directory path but cannot seem to get the right code / syntax.
Private Sub OpenWordDocument_Click()
Dim oApp As Object
Dim strDocName As String
strDocName = "C:/Documents/Instructions.docx"
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
oApp.Documents.Open strDocName
End Sub
Could somebody please help?
Private Sub OpenWordDocument_Click()
Dim oApp As Object
Dim strDocName As String
strDocName = "C:/Documents/Instructions.docx"
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
oApp.Documents.Open strDocName
End Sub
Could somebody please help?