View Single Post
 
Old 09-29-2020, 09:25 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,969
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

The code includes a line at the end that protects the document. If you disable that line you remove the protection that is reinstated EVERY time the code runs. This would allow you to edit the document normally and remove the table.

The line you want to disable is
ActiveDocument.Protect wdAllowOnlyFormFields, True, StrPwd

You disable it by adding a single quote in front of it
'ActiveDocument.Protect wdAllowOnlyFormFields, True, StrPwd

Then return to your document and move your cursor from one CC to another to ensure the code has run. You will then be able to edit the doc. If you want the document protected for your users, just go back in to the code and delete the single quote again. Note that you don't have to use a protected document to see the code do the colouring.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote