I am using the Code listed below in Access 2000 with a Command Button to Open Word, Open a Document and then run a Word Macro.
[VBA]
Private Sub Command7_Click()
On Error GoTo Err_OpenGuide

Dim Oapp As Object

Set Oapp = CreateObject("Word.Application")
Oapp.Documents.Add "C:\Divisions\PrintOut.doc"
Oapp.Run "PrintOut"
ActiveDocument.ActiveWindow.Close
Set Oapp = Nothing
Exit_OpenGuide:
Exit Sub



Err_OpenGuide:
MsgBox Err.Description
Resume Exit_OpenGuide

End Sub
[/vba]
The problem is when I have created a Second Command Button( to open another Doc. File) with the following Code,

[VBA]
Private Sub cmdReport_Click()

Call ReportCreation(Me![cboDiv], Me![cboBuyer])

On Error GoTo Err_OpenGuide

Dim Oapp As Object

Set Oapp = CreateObject("Word.Application")
Oapp.Documents.Add "C:\Divisions\Report.doc"
Oapp.Run "PrintOut"
ActiveDocument.ActiveWindow.Close
Set Oapp = Nothing
Exit_OpenGuide:
Exit Sub

Err_OpenGuide:
MsgBox Err.Description

Resume Exit_OpenGuide



End Sub
[/vba]

When I ran the Code from the button the Macro did not run. The Document did open.

I sure could use some help with this.


Thanks



Jack