FileOpen in Jscript

R

Ryan Moore

Hello all,

I am trying to add a function to the project guide. This like will insert an
xml template into the currently open project. I have tested this in both
VB.net and in Project VBA. When I attempt this in Jscript I get nothing but
errors.

Here is the .Net code:
Dim objProj As New Microsoft.Office.Interop.MSProject.Application
objProj.FileOpen("c:\TestTemplate.xml", False,
PjMergeType.pjMerge, , , , , , , "MSProject.XML")

The VBA Code:
FileOpen Name:="C:\TestTemplate.xml", ReadOnly:=False, Merge:=1,
FormatID:="MSProject.XML"

Any ideas on what will make this work in jscript?

Thanks for your help,
Ryan
 
R

Ryan Moore

Thanks all but I solved the issue. It was simply too long looking at the same
code!
It should have been "objProj.FileOpen("c:\\TestTemplate.xml", ...."

Thanks again,
Ryan
 

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