Solved

MSProject 03: mpp opened by VBA automation in Access opens read-only

Posted on 2010-09-17
7
506 Views
Last Modified: 2012-05-10
I have a Project mpp in a folder on a local drive. For years this file (which gets replaced frequently by a new file with the same name) has opened normally using vba/automation in MSAccess. The file has now begun to open read-only when opened in this manner:
...
Set objMSProj = CreateObject("MSProject.Application")
objMSProj.FileOpen ("c:\MyFolder\CurrProj.mpp")
...
The file is not marked read-only in Windows properties. The issue is that my process includes a save operation, and now a Save As prompt is appearing, which is a problem because the process runs unattended in the middle of the night.

Any suggestions would be appreciated.
0
Comment
Question by:dgmoore1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33703874
was there any updates done recently in the computer.
i had a similar case where applications running automatically stops, giving errors etc.,
we traced the problem from upgraded virus protection program..
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33703994
I do not know the reason why

But as a workaround if u try to force the open specifying readonly flag, does that work?

Set objMSProj = CreateObject("MSProject.Application")
objMSProj.FileOpen ("c:\MyFolder\CurrProj.mpp", ReadOnly:=False)

Also try on the save, use SaveAs

objMSProj.SaveAs "C:\MyFolder\CurrProj.mpp"


These do not solve the reason for readonly open but am hoping it would be something to get you going in the interim
0
 

Author Comment

by:dgmoore1
ID: 33704137
I'll try the ReadOnly:=False and see what I get. Thanks
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dgmoore1
ID: 33704185
It doesn't like the syntax ("c:\MyFolder\CurrProj.mpp", ReadOnly:=False) (or any version with or without a comma, or putting the ReadOnly inside the quotes, etc.)

Is there a different way of specifying ReadOnly?
0
 

Author Comment

by:dgmoore1
ID: 33704250
Capricorn, as far as I know there have been no computer upgrades, but it's hard to know because I'm on a WAN with thousands of users and admin pushes out upgrades in the middle of the night and we never know about them...
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 33704281
Ok, I do not have project installed but was hoping it would work along the same lines as the other office products.
So having a look I came across this. It seems after a while the file becomes readonly.

http://www.eggheadcafe.com/software/aspnet/33016704/ms-project-sets-open-file-to-readonly-must-do-save-as.aspx

You might need to try the SaveAs as I said earlier. It is also something someone did in the link above.

From the link the responsse from MS is

"I did a bit more looking into the issue. It seems that you are not the first person to have come across this. It is recommended for Project to not open projects through links or file shares. As for why this does not work the same
as other Office products, apparently Microsoft Project was designed outside the Microsoft Office group. Thus many of the basic protocols, such as saving, loading and printing, are fundamentally different from other Office products
from a design standpoint. We can continue testing to verify that it is an issue with opening the project from a file share, but I have been advised that it is very likely that this is what we will find to be the case."

0
 

Accepted Solution

by:
dgmoore1 earned 0 total points
ID: 33727467
I have worked around the problem by saving the original mpp to a new file. The new file is not read-only.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question