jamienwood
Board Regular
- Joined
- Apr 14, 2002
- Messages
- 133
What code can i use to make a file open when i clikc a button on a form, it is actuially going to be a help file written in Microsoft word called RepotPrinterHelp.doc
Sub Test()
Dim wdApp As Object, wdDoc As Object
On Error Resume Next
Err.Clear
Set wdApp = GetObject(, "WORD.APPLICATION")
If Err.Number <> 0 Then
Set wdApp = CreateObject("WORD.APPLICATION")
End If
On Error GoTo 0
wdApp.Documents.Open "C:temptest file.rtf"
wdApp.Visible = True
AppActivate "Microsoft Word"
End Sub