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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling close box buttons in Word

Status
Not open for further replies.

Grieg

Technical User
Sep 13, 2002
20
GB
Hi,

I have an automated Word letter template where the user has to use a custom icon\menu item to save and close the document (so that code behind the template can carry out various checks on the content and decide where the document is to be saved to).

What I need to know is, is there anyway the top right hand corner close box buttons can be disabled, both on the document and the Word application?

Any help would be greatly appreciated,

Grieg.
 
Hello

If you type QueryClose into the VB help you should get a little information on it

i use it in a userform

Code:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
'** If the user trys to close the form or application, they are prevented
'** The form can only be closed by selecting 'Ok' or 'Cancel'
'** See Help > QueryClose Event
   If CloseMode = 0 Then Cancel = 1
End Sub

hope it helps :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top