Disable closebutton 
Author Message
 Disable closebutton

Hi,
I'm connecting to a word-doc. from a Visual Basic
application. I would like to control what happens when a
user closes the document. My idea is to disable the close
button (the X) for word, and make my own close-button. But
I can't figure out how?? I manage to se visible = false on
the menu by running:
CommandBars("File").Controls("&Close").visible = false
But this is not enough, because I want the X-button to go.
In the MSDN-help (Q192320) I found an aritcle that says it
should be "System" instead of "File". This is not working.
What shall I do? Please help me!


Sat, 03 Apr 2004 19:50:11 GMT  
 Disable closebutton


Quote:
>Hi,
>I'm connecting to a word-doc. from a visual basic
>application. I would like to control what happens when a
>user closes the document. My idea is to disable the close
>button (the X) for word, and make my own close-button. But
>I can't figure out how?? I manage to se visible = false on
>the menu by running:
>CommandBars("File").Controls("&Close").visible = false
>But this is not enough, because I want the X-button to go.
>In the MSDN-help (Q192320) I found an aritcle that says it
>should be "System" instead of "File". This is not working.
>What shall I do? Please help me!

If you use these following names for your macro - the built-in close
button will direct the user to your code:

AutoClose Each time you close a document
AutoExit When you quit Word or unload a global template

Steve Hudson



Sun, 04 Apr 2004 11:58:35 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Hide or Disable the closebutton of a Userform

2. Disable the ControlBox (Window CloseButton)

3. need help with CloseButton=false

4. User and CloseButton - RE:

5. CloseButton

6. CloseButton and User

7. ControlBox (Window CloseButton)

8. Min, Max, and CloseButton question

9. CRViewer CloseButton not enabled ?

10. disabling the DISABLE/ENABLE macros menu on opening spreadsheet

11. disable the enable/disable macro message

12. window task bar and desktop disable or all icon disable

 

 
Powered by phpBB® Forum Software