vangogh228
Registered User.
- Local time
- Today, 18:05
- Joined
- Apr 19, 2002
- Messages
- 302
Hello all.
I'm trying to open a document from a button on a form... as many others have done. Here's my code, that I based on successful code that opens an excel spreadsheet (edited as well as I could figure out for word)... but it fails on the Set objWdDoc line. Any help is greatly appreciated.
Dim objWdApp As Object
Dim objWdDoc As Object
Set objWdApp = CreateObject("Word.Application")
Set objWdDoc = objWdApp.Documents.Open("\\dbdfile\ARSupport$\Projects\" & Forms!ProjectMainForm.ProjectName.Value & " - MD50.doc")
objWdApp.Visible = True
(((The space displayed in the path in the middle of the word "Projects" is a display error here.)))
Thanks again.
Tom
I'm trying to open a document from a button on a form... as many others have done. Here's my code, that I based on successful code that opens an excel spreadsheet (edited as well as I could figure out for word)... but it fails on the Set objWdDoc line. Any help is greatly appreciated.
Dim objWdApp As Object
Dim objWdDoc As Object
Set objWdApp = CreateObject("Word.Application")
Set objWdDoc = objWdApp.Documents.Open("\\dbdfile\ARSupport$\Projects\" & Forms!ProjectMainForm.ProjectName.Value & " - MD50.doc")
objWdApp.Visible = True
(((The space displayed in the path in the middle of the word "Projects" is a display error here.)))
Thanks again.
Tom