How to convert mpp to xml

R

rayyang

I want to convert a mpp to xml by automation.
But I don't know how to use the api and msdn does not say enough to it.
Here is the code to save the mpp to xmlapp.FileSaveAs(
"c:\\" + filename,
MSProject.PjFileFormat.pjMPP,
oMissing,
oMissing,
oMissing,
oMissing,
oMissing,
oMissing,
oMissing,
"MSProject.XMLDOM",
oMissing,
oMissing,
oMissing,
oMissing,
oMissing,
oMissing,
oMissing,
doc, // xmlName (What is this object?)
oMissing);

I don't know which object it needs in the xmlname parameter.

Is anyone has some idea about this?
 
R

rayyang

Hi, it works. Thanks

Rod Gill said:
Try recording a macro in VBA of you saving the project to xml. You then have
to convert to C# and will why VBA and VB are preferable for automating
Office applications! Optional and named parameters make code much easier to
understand and write!

--

Rod Gill
Project MVP

Project VBA Book, for details visit:
http://www.projectvbabook.com

NEW!! Web based VBA training course delivered by me. For details visit:
http://projectservertraining.com/learning/index.aspx
 

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