I
ItsMe
In a protected form, I created a macro in exiting a DD field so the content
of an enclosing bookmark somewhere else in the document disappears when the
user chooses "No".
If ActiveDocument.FormFields("bkxxxxx").Result = "No" Then
pToggleProtectDoc (ie to unprotect doc)
ActiveDocument.Bookmarks("bkxxxxx").Range.Delete
pToggleProtectDoc (ie to reprotect doc)
Else
Exit Sub
End If
Everything works perfectly fine except that if I somehow go back to the DD
field, of course this message pops up: "requested member of collection does
not exist".
Is there a line that I could add to my macro to prevent this.
Thanks in advance.
of an enclosing bookmark somewhere else in the document disappears when the
user chooses "No".
If ActiveDocument.FormFields("bkxxxxx").Result = "No" Then
pToggleProtectDoc (ie to unprotect doc)
ActiveDocument.Bookmarks("bkxxxxx").Range.Delete
pToggleProtectDoc (ie to reprotect doc)
Else
Exit Sub
End If
Everything works perfectly fine except that if I somehow go back to the DD
field, of course this message pops up: "requested member of collection does
not exist".
Is there a line that I could add to my macro to prevent this.
Thanks in advance.