Tough one Project 2k and vbscript 
Author Message
 Tough one Project 2k and vbscript

I can create an instance of Project2k. I want to be able to open a Project
that has been stored in SQL 7.

It works great in VB the code is here:

Set pj = CreateObject("MSProject.Project")

pj.Application.FileOpen Name:="<Project_Db>\" & projectnamed,
ReadOnly:=True, UserID:="sa",  DatabasePassWord:="projectpw",
FormatID:="MSProject.ODBC"

 pj.Application.Visible = True

:end code

Now I want to be able to do the same thing on a web page. I can create an
instance of  Project2k on the client. The hard part is getting it to load a
project that is stored in the database. The VB code does not port directly
to VBScript for some reason. My guess is a syntax problem (but I'm probably
wrong).

Thanks

Lee Franke



Tue, 15 Apr 2003 04:17:45 GMT  
 Tough one Project 2k and vbscript

VBScript doeesn't support named parameters.

pj.Application.FileOpen Name:="<Project_Db>\"
                                          ^^^^
<

--
Dominic

Read The Docs? http://msdn.microsoft.com/scripting


Quote:
> I can create an instance of Project2k. I want to be able to open a Project
> that has been stored in SQL 7.

> It works great in VB the code is here:

> Set pj = CreateObject("MSProject.Project")

> pj.Application.FileOpen Name:="<Project_Db>\" & projectnamed,
> ReadOnly:=True, UserID:="sa",  DatabasePassWord:="projectpw",
> FormatID:="MSProject.ODBC"

>  pj.Application.Visible = True

> :end code

> Now I want to be able to do the same thing on a web page. I can create an
> instance of  Project2k on the client. The hard part is getting it to load
a
> project that is stored in the database. The VB code does not port directly
> to vbscript for some reason. My guess is a syntax problem (but I'm
probably
> wrong).

> Thanks

> Lee Franke



Tue, 15 Apr 2003 04:21:44 GMT  
 Tough one Project 2k and vbscript

I figured that out.

So how do I do it.

Thanks,

Lee Franke

Quote:
> VBScript doeesn't support named parameters.

> pj.Application.FileOpen Name:="<Project_Db>\"
>                                           ^^^^
> <

> --
> Dominic

> Read The Docs? http://msdn.microsoft.com/scripting



> > I can create an instance of Project2k. I want to be able to open a
Project
> > that has been stored in SQL 7.

> > It works great in VB the code is here:

> > Set pj = CreateObject("MSProject.Project")

> > pj.Application.FileOpen Name:="<Project_Db>\" & projectnamed,
> > ReadOnly:=True, UserID:="sa",  DatabasePassWord:="projectpw",
> > FormatID:="MSProject.ODBC"

> >  pj.Application.Visible = True

> > :end code

> > Now I want to be able to do the same thing on a web page. I can create
an
> > instance of  Project2k on the client. The hard part is getting it to
load
> a
> > project that is stored in the database. The VB code does not port
directly
> > to vbscript for some reason. My guess is a syntax problem (but I'm
> probably
> > wrong).

> > Thanks

> > Lee Franke



Tue, 15 Apr 2003 04:56:34 GMT  
 Tough one Project 2k and vbscript

Find a list of all the parameters and pass them in order.

pj.Application.FileOpen Name:="<Project_Db>\" & projectnamed,
ReadOnly:=True, UserID:="sa",  DatabasePassWord:="projectpw",
FormatID:="MSProject.ODBC"
<

Might become:
pj.Application.FileOpen "<Project_Db>\" & projectnamed,
True,,"sa",,"projectpw"

I don't have Project so I'm sampling about the arguments.

--
Dominic

Read The Docs? http://msdn.microsoft.com/scripting


Quote:
> I figured that out.

> So how do I do it.

> Thanks,

> Lee Franke


> > VBScript doeesn't support named parameters.

> > pj.Application.FileOpen Name:="<Project_Db>\"
> >                                           ^^^^
> > <

> > --
> > Dominic

> > Read The Docs? http://msdn.microsoft.com/scripting



> > > I can create an instance of Project2k. I want to be able to open a
> Project
> > > that has been stored in SQL 7.

> > > It works great in VB the code is here:

> > > Set pj = CreateObject("MSProject.Project")

> > > pj.Application.FileOpen Name:="<Project_Db>\" & projectnamed,
> > > ReadOnly:=True, UserID:="sa",  DatabasePassWord:="projectpw",
> > > FormatID:="MSProject.ODBC"

> > >  pj.Application.Visible = True

> > > :end code

> > > Now I want to be able to do the same thing on a web page. I can create
> an
> > > instance of  Project2k on the client. The hard part is getting it to
> load
> > a
> > > project that is stored in the database. The VB code does not port
> directly
> > > to vbscript for some reason. My guess is a syntax problem (but I'm
> > probably
> > > wrong).

> > > Thanks

> > > Lee Franke



Tue, 15 Apr 2003 05:30:46 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Tough one - new window alert

2. Here's a tough one...

3. A tough one! Import password protected VBA

4. Attention Access Experts, this one is tough...

5. Running Native Access commands in VB..Tough one

6. tough one for you experts

7. A tough one.. animating buttons

8. This is a tough one....

9. Tough one!!!

10. tough one for you experts

11. tough one for you experts out there...

12. This is a tough one ( ActiveX Dll problem )

 

 
Powered by phpBB® Forum Software