craigachan
Registered User.
- Local time
- Today, 11:13
- Joined
- Nov 9, 2007
- Messages
- 285
I've been trying to adapt the 'Super Easy Word Function" to my database. I'm slowing finding out what to do. The problem I'm having is on my Vista machine the word app, when launched from Access immediatly minimizes to the taskbar. I've added a reference to MS Word library and then added WordApp.visible = True. But then I get a Runtime Error 91. I'm new to VB and can seem to figure out what is wrong. Mostly because I don't understand yet the explainations. Here is my code.
<code>
Private Sub cmdMerge_Click()
Dim WordApp As Word.Application
' merge the doc
If IsNull(Me.lstFiles) = False Then
Call RidesMergeWord(strDirPath & Me.lstFiles & ".doc", strDirPath, strOutDocName)
DoCmd.Close
WordApp.Visible = True
Else
MsgBox "You need to select a Word document", vbExclamation, "Word Merge"
End If
End Sub
</code>
Please help if you can. I'm sure most of the answers are already posted but I don't know what it means. the word document that I'm opening is called Test.doc.
<code>
Private Sub cmdMerge_Click()
Dim WordApp As Word.Application
' merge the doc
If IsNull(Me.lstFiles) = False Then
Call RidesMergeWord(strDirPath & Me.lstFiles & ".doc", strDirPath, strOutDocName)
DoCmd.Close
WordApp.Visible = True
Else
MsgBox "You need to select a Word document", vbExclamation, "Word Merge"
End If
End Sub
</code>
Please help if you can. I'm sure most of the answers are already posted but I don't know what it means. the word document that I'm opening is called Test.doc.