MS Project OLE Automation Object Error

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

Subject: MS Project OLE Automation Object Error

I’m a bit slow and can never figure out what line they mean when line number is listed so I’d kill the On Error and step through the code to make sure where it actually dies.

If line 5 is the line where you open the file, make sure your drive mappings haven’t changed and the file actually exists.

If that’s all OK, did anything change on the actual Project side? Service Pack, version change? If so, you’ll want to make sure that the syntax hasn’t changed (and that’ll probably have to be done on the Project side using whatever script browser is available).

FWIW, I HATE spaces in file names - any chance those are causing you problems?

Doug

Subject: MS Project OLE Error - Rebooted Server

Thank you for the response Doug. I still don’t know quite what was going on, but I rebooted the Windows 2003 Server that hosts Domino and all is working now.