Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Visual Basic for Applications

Post new topic   Reply to topic
MSProject.Application.FileSaveAs
View previous topic :: View next topic  
Author Message
swatiraje
Newbie


Joined: 17 Mar 2004
Posts: 1

PostPosted: Mar 17th, 2004 04:53 AM    Post subject: MSProject.Application.FileSaveAs Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Visual Basic for Applications All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic