What VB script can I use to open a Word document from Access? I've tried some techniques, but none seem stable...Any ideas? thanks.
Printable View
What VB script can I use to open a Word document from Access? I've tried some techniques, but none seem stable...Any ideas? thanks.
While in the code screen you can add references, so add one for the Microsoft Word Object.
You can also use the word object to modify the document through code.Code:Private Sub Command0_Click()
Dim Wrd As Word.Application
Set Wrd = CreateObject("Word.Application")
Wrd.Documents.Open "C:\test.doc"
Wrd.Visible = True
End Sub
Hope this helps,
Yes thank you. I also discovered a most helpful document that should help anyone with anything regarding VB and Word.
The final code is very similar to yours.
If any one is interested:
http://msdn.microsoft.com/library/of...97/web/007.htm