none
VBA API to get default file save path with Microsoft Project RRS feed

  • Question

  • With MS Word 2010, the following APIs provide you the default file save path for the application:

    Application.Dialogs(wdDialogToolsOptionsFileLocations).Setting
    Application.Options.DefaultFilePath(wdDocumentsPath)

    I am looking for a similar API with Project 2010. Does such an API exist for Project?

    [I could not find the right forum to post problems related to Project VBA, so I am posting my query here].


    Parul Gupta

    • Moved by Cindy Meister MVP Tuesday, November 6, 2012 4:34 PM Project-specific question (From:Word for Developers)
    Tuesday, November 6, 2012 1:43 PM

All replies

  • Have a look at application.OptionsSave (and see Project VBA help about it) it can return what you want.

    Rod Gill

    The one and only Project VBA Book

    Rod Gill Project Management

    Wednesday, November 7, 2012 8:11 AM
    Moderator
  • Thanks Gill for the info.

    I tried using this API but it only allows you to set the default save path  value to a new value. It does not return you the current file save path location. Is there some other way to use this command?


    Parul Gupta

    Thursday, November 8, 2012 6:10 PM
  • I looked in the Object Browser and couldn't find anything so you are probably out of luck. So what do you want to know the default save path for? Let us know as there may well be another way to solve your original problem.

    Rod Gill

    The one and only Project VBA Book

    Rod Gill Project Management

    Thursday, November 8, 2012 10:17 PM
    Moderator
  • I need to throw a File Save As dialog using VBA. But with all calls except Application.FileSave,  a save location needs to be specified.

    The VBA API Application.FileSave used to work fine with Office 2010. But with Office 2013, this API  take the user to Project backstage view and returns false irrespective of user action. Due to this, I am forced to use Application.FileSaveAs API, which requires me to provide a save location. And  I want this location to be the default file save path of Project.


    Parul Gupta

    Monday, November 12, 2012 3:16 PM