Hi,

I am trying to save a microsoft project to an MSXML2.DomDocument. I am able to do it using a vb macro and running it from Project 2002. However, when I try and run a com add-in from Project, I get the error:

"microsoft visual basic run-time error -2147417851 (80010105)
Method 'FileSaveAs' of object '_MSProject' failed"

here's a snippet of my code:

Dim doc
Dim app As New MSProject.Application

'Create an XML DOM document
Set doc = CreateObject("MSXML2.DOMDocument")

'Save the project to the DOM document
app.FileSaveAs FormatID:="MSProject.XMLDOM", XMLName:=doc

NOTE: I am able to use the "SaveAs" method and save the xml file in the same com add-in.

I am using VB 6.0 for creating the com add-in's dll.
Anybody there who knows what could be the problem?