?
Solved

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

Posted on 2010-09-17
7
Medium Priority
?
517 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
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 

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

Technology Partners: 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!

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Suggested Courses

762 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