Using GetObject with Read Only project file.

T

ToddR

I am trying to incorporate the use of project data in an Excel macro using
the "GetObject" command. However, the project is password protected and
invokes a dialog box requesting the password or a selection of 'Read Only".
How do I automatically select the read only option to avoid manual
intervention to keep the macro moving? If this is not an option, then what
command(s) should I use to permit the equivalent of the following:

Set prj = GetObject("Myproject.mpp")

where Myproject.mpp is password protected, and I want to open it as read
only and be able to read the contents of the project as data with my excel
macro?
 
J

Jan De Messemaeker

Hi,

You better approach this as follows:
Set PjAPP=createobject("MSProject.application")
set prj=pjapp.fileopen ...
Look at the help on teh fileopen method, it allows you to enter a pssword,
but also to open read only.
Hope this helps,

--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
+32 495 300 620
For availability check:
http://users.online.be/prom-ade/Calendar.pdf
 

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