Open a resource pool in read-only mode without a prompt dialog RRS feed

  • Question

  • Hello world,

    I would like to open a resource pool (only the pool, without a project). There are some projects attached to my pool, so I keep getting the "open resource pool" dialog box which asks me if I want to open it read-only, read-write, or read-write with all attached projects.

    Is there a way to suppress this dialog? The best thing would be a command line switch like /R for read-only, if there is one, because I open the pool from a command-line anyway.

    The reason for this is that I need to do some batch processing, where there is no user to reply to this dialog.

    Thank you all in advance!


    Sunday, February 16, 2020 11:46 AM

All replies

  • GeroTheHero,

    I can't help you with command lines but if you use VBA, this simple code will open a resource pool read only without any pop ups.

    Sub OpenPool()
    Dim pf As Project
    FileOpenEx Name:="C:\Users\John\Documents\RPool.mpp", ReadOnly:=True, OpenPool:=pjPoolReadOnly
    End Sub

    I don't have time to look at it, but I believe you can use VBA to close files without saving which should answer your other questions.


    Sunday, February 16, 2020 5:04 PM