I am trying to control all aspects of users closing a document. Turning off the menu selection seems to work fine but I also need to turn off the close this tab, close all tabs, and any other close i can find. I have 2 question's is there and easier way to disable closing an open document and if not when using for soem reason the code below will not disable the tabs closing only the NAMED comand appears to work. I am not getting an error, am I missing something?
Thanks
Code: Select all
Call CoPDFXCview1.SetProperty("Commands[""Close""].State", "Disabled", 0) 'menu close
Call CoPDFXCview1.SetProperty("Commands[#33256].State", "Disabled", 0) ' close this tab
Call CoPDFXCview1.SetProperty("Commands[#33255].State", "Disabled", 0) 'close all tabs
Call CoPDFXCview1.SetProperty("Commands[#57682].State", "Disabled", 0) ' close window
'32937 'close active tab
'32942 'close all windows
'33038 'close all
'57602 'close