Unable to create an xml file in Project 2003

S

SiOptix

I am trying to create an xml file from Project 2003 using the visual basic
editor. I copied the code supplied for project 2002 from microsoft but
there's an "Automation error" for the "FileSaveAs" command, app.FileSaveAs
FormatID:="MSProject.XMLDOM", XMLName:=XMLdoc. The code that I am using is
pasted below, can someone figure out why this error message is popping up???
Also, is there an easier way to grab certain reports (critical tasks,
completed tasks, etc) from Project 2003 and put it on an html page??

Dim app As New MSProject.Application
Dim htmlFile As String, xsltFile As String
Dim XMLdoc As Object, XSLdoc As Object


'Create an XML DOM document and save the project to it.
Set XMLdoc = CreateObject("MSXML2.DOMdocument")
XMLdoc.async = False
app.FileSaveAs FormatID:="MSProject.XMLDOM", XMLName:=XMLdoc
 
C

calihdog

I'm not sure about the rest of the code but for Project 2003,
MSProject.XMLDOM isn't a valide format ID. To save as an XML doc you want
"MSProject.XML".

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top