open not as read only

T

theintern

Can anyone tell me how to program it to open the file, not as a read only? I
can't use a call shell method because somepeople are running OFFICE11 and
others OFFICE12 so the folders for Microsoft project aren't consistent. thus
i have to use the following method, but when doing so it opens it as a
readonly, not allowing me to save changes when i'm done.

thanks!
scott

Public Function TriFilter2()

Dim pr As MSProject.Application

DoCmd.SetWarnings False

Set pr = New MSProject.Application
pr.Visible = False
pr.FileOpen ("U:\Estimating Log\Est Schedule\Take-offIndividual.mpp")

DoCmd.SetWarnings True


End Function
 
R

Rod Gill

What warnings do you get if you comment out the SetWarning statements?

Can you open the schedule with write access manually?

What code do you get if you record a macro of you opening the project (and
it opens in write mode)?

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
T

theintern

1) opens up the save as dialogue box
2) no, it opens as read only even then
3) FileOpen Name:="U:\Estimating Log\Est Schedule\Take-offIndividual.mpp",
ReadOnly:=False, FormatID:="MSProject.MPP.12" but it still opens as read
only. i thought maybe it had to do with permissions, but i created the file,
so i should have read/write access to it.
 
T

theintern

Also, it opens a help box that says it detected that the file i'm opening was
created in Project 2007 and might contain some features not available in 2003
(which is what i'm running). i know this to not be the case since i created
the file, but i think we opened it on someone else's computer, in 2007. did
that screw things up? it says it can be fixed by downloading SP3 for
Project. should i do so?

thanks!
scott
 
R

Rod Gill

If the file opens read-only when you open it manually, there is nothing that
Project or project VBA can do. The problem must be with the
network/folder/permissions etc.



--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
R

Rod Gill

SP3 is required for Project 2003 to open Project 2007 format files. If
someone else opened the file in 2007 and saved in 2007 then that is probably
the problem. Install SP3 to see if it fixes the problem, but usually if you
don't have SP3 you can't open the file at all, even in read only mode.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
T

theintern

i have SP3 already it turns out.

I need vba to be run in 07 that will save the file, but i need it to save it
without any of the 07 stuff. this was causing the problem. if you do it
manually, it comes up with these boxes asking if you want to save in the new
format, and if you say no to all of them then it does it correctly. however,
if i just run the vba FileSave, then it saves it in the new format and those
running 03 can only open it in read-only mode. i tried recording a macro of
me clicking No in all those boxes, but all it recored was FileSave.

thanks
scott
 
R

Rod Gill

Project 2003 SP3 can read 2007 files.

Or, in 2007 save as Project 2000-2003 format. Record a macro of you doing it
manually to see the code needed.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
T

theintern

FileSaveAs Name:="U:\Estimating Log\Est Schedule\Take-off.mpp",
FormatID:="MSProject.MPP.9"

does the trick. the important part is the .9 at the very end.
 

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