Solved

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

Posted on 2010-09-17
7
493 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
  • 4
  • 2
7 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
MS Access 2003 or later To MySQL Migration Project Hello All, this is my second article in the category of MS-OFFICE Automation. In internet I am not able to find any comprehensive resource on the Migration of MS Access back-end to MySQL so I fin…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now