
disabling close button in word 2000
Hi Steve,
Take a look at the article "A Pseudo DocumentBeforeClose Event
Or: How to perform validation on a document when the user tries to close
it." at:
http://www.mvps.org/word/FAQs/MacrosVBA/PseudoBeforeClose.htm
Please post any response to the newsgroups for the benefit of others who may
also be following the thread.
Hope this helps,
Doug Robbins - Word MVP
Quote:
> I am using Powerbuilder to manipulate word 2000 through
> visual basic commands. I can disable the file/close menu
> through the following code but have not found a way to
> also disable the close button(x). Does anyone have any
> ideas?
> Thank you in advance for any feedback.
> Steve
> lole_commandbars = fpub_uos_oleobject
> (iole_word_app.CommandBars)
> lole_system_commandbar = fpub_uos_oleobject
> (lole_commandbars.Item("System"))
> lole_controls = fpub_uos_oleobject
> (lole_system_commandbar.Controls)
> lole_close_control = fpub_uos_oleobject(lole_controls.Item
> ("&Close"))
> lole_close_control.Visible = False