Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress Word "Would you like to save this doc" message

Status
Not open for further replies.

DrSmyth

Technical User
Jul 16, 2003
557
GB
Hi,

I've got a word form with a few bits of vba on it that people are accessing through an intranet. However, when people back up out of the page it always asks them if they would like to save the document, is there any way of suppressing this message?

Andy
 
DrSmyth,

To avoid those dialog boxes in Excel, I use the following bit of code. Presumably, aside from the 'SaveAs' method arguments, something similar should work in Word as well.

Code:
Application.DisplayAlerts = False
ThisWorkbook.SaveAs "testfile.xls", xlWorkbookNormal
Application.DisplayAlerts = True

Good Luck:)
 
Hiya,

just to add to that: instead of TRUE/FALSE you can use the following 3 constants in Word:
[ul]
[li]wdAlertsAll[/li]
[li]wdAlertsNone[/li]
[li]wdAlertsMessageBox[/li]
[/ul]

HTH


Cheers
Nikki
[bat] Look, mommy, I'm flying!
 
Cheers Gents, works like a dream....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top