A way to suppress dialog boxes when saving/publishing MS Project 2

T

tfz

Is there a way to suppress dialog dialog boxes when running a macro from VBA
in MS Project 2007?

I'm calling the Application.FileSave() method followed by the
application.PublishAllInformation() method to cycle through some projects and
save/publish them, but when I call the PublishAllInformation() method, I
sometimes get a message box saying that the file must be saved before it can
be published (even though I just did that). Is there a way to suppress that
message box, so my macro can run unattended? The save method seems to be
working, the message I'm getting seems to be unnecessary.

Thanks!
 
J

Jack Dahlgren

Application.DisplayAlerts = False

will turn them off.
Remember to turn them on at the end of your macro!

sub tfz()
Application.DisplayAlerts = False
'save and publish projects
Application.DisplayAlerts = True
end sub


-Jack Dahlgren
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top