ms word - How to detect when a user attempts to modify a protected document MSWord 2003 -


i attempting create document template in msword 2003 (actually 2007, in 2003 format), running on win7 machine, user create document, user approve document, can print document. final document read-only protected through word's protection feature. i've got of down in vba code well, it's relatively straightforward.

i able add when user attempts modify protected final document vba code detect , create new document new revision level. can't seem figure out code needed trap event user attempts modify read-only document. know if possible? if not, ill add second button allow creation of new revision of document.

thanks in advance.

i can't give direct answer without seeing code... give user dialog box upon opening options either make new save or close.

example code yes/no dialog box , if statement:

dim yesornoanswertomessagebox string dim questiontomessagebox string      questiontomessagebox = "are expert of vba?"      yesornoanswertomessagebox = msgbox(questiontomessagebox, vbyesno, "vba expert or not")      if yesornoanswertomessagebox = vbno          msgbox "learn more vba!"     else         msgbox "congratulations!"     end if 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -