Forum Discussion
MS Project VBA Default Location and Default AutoScheduled tasks
Hello,
I have two VBA related questions for MS Project.
1) How do I find the Default File Location?
In Excel it is easy with Application.DefaultFilePath but I can't seem to find an equivalent in MS Project.
2) How can I set the default Task Mode to Auto Scheduled for all new projects?
I know how to do it in the manually in the options but I'm looking for a VBA approach.
Thank You
It is a little strange about the auto/manual scheduling option not being available via VBA, all the other scheduling options are.
Yes, you can set auto/manual in the registry. This is what it looks like on my PC, which is currently set for auto schedule.
John
7 Replies
- John-projectSilver Contributor
The default file path for save operations is controlled by the Project options setting. Unfortunately those settings are not readable directly as they are in Excel. I haven't tried this but it may be possible to get the default file path by creating and querying a FileSystemObject.
Another option is an indirect method and that is simply opening a file you know is in the default location and then using: ActiveProject.FullName
On your other question, for whatever reason the scheduling mode is not an exposed parameter when setting options using VBA. Sorry.
Hope this helps.
John- Gilgamesh1964Brass ContributorThank you for a quick response.
I will have a play around with FileSystemObject and see what I can get there.
On Auto Scheduling, It seems strange to me that something (in my opinion) is so important is not available.
Do you know if this is stored in a Registry Key, I may try making adjustments there?
The reason for the questions is that our IT department just installs an out-of-the-box version of MS Project, but our Project Office has some standards. I'm trying to automate setting those standards rather than relying on people who can make mistakes.- John-projectSilver Contributor
It is a little strange about the auto/manual scheduling option not being available via VBA, all the other scheduling options are.
Yes, you can set auto/manual in the registry. This is what it looks like on my PC, which is currently set for auto schedule.
John