I am having trouble with an MS Project OLE Automation object. The original daily agent was running fine a month ago, but I can’t tell what has changed. I’ve boiled the agent down tot he following test agent that still gets the same “Automation object error”. What could I be doing wrong? Thanks in advance for your help!
Sub Initialize
Dim projfile As Variant
On Error Goto projerr
Set projfile = createobject( “MSProject.Application” )
projfile.Application.FileOpen(“Y:\TUTTLE\PLS docs\PLS P221 Timeline Revised.mpp”)
If Not( projfile Is Nothing ) Then Call projfile.Quit(1)
projerr:
Print "Error " & Err() & " on line " & Erl() & ": " & Error()
End Sub
Results in the server log:
06/02/2008 10:25:09 AM AMgr: Agent (‘June 2 test’ in ‘prod\PLS_JAC.nsf’) printing: Error 207 on line 5: Automation object error
06/02/2008 10:25:09 AM AMgr: Agent (‘June 2 test’ in ‘prod\PLS_JAC.nsf’) error message: No RESUME