Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
other
informationbridge
office.intranets
office.misc
office.setup
office.xml
officeupdate
onenote
photodraw.discussion
powerpoint
producer
proj.standard&server
project
project.developer
project.pro_and_serve
project.server
project.vba
project2000
publisher
publisher.prepress
publisher.programming
publisher.webdesign
visio
visio.createshapes
visio.database.modeling
visio.dev.diagrams
visio.dev.shapesheet
visio.dev.vba
visio.dev.vc
visio.developer
visio.general
visio.installation
visio.printing
visio.software.modeling
visio.troubleshoot
  
 
date: Wed, 23 Jul 2008 05:59:18 -0700,    group: microsoft.public.project.developer        back       


A way to suppress dialog boxes when saving/publishing MS Project 2   
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!
date: Wed, 23 Jul 2008 05:59:18 -0700   author:   tfz

RE: A way to suppress dialog boxes when saving/publishing MS Project 2   
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

"tfz" wrote:

> 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!
date: Wed, 23 Jul 2008 07:25:02 -0700   author:   Jack Dahlgren

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us