Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #16  
Old 09-29-2020, 09:25 PM
Guessed's Avatar
Guessed Guessed is offline Changing background colour in table based on value. Windows 10 Changing background colour in table based on value. Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Background Word Colour not showing on PDF phorsley Word 1 04-24-2020 09:18 AM
Changing background colour in table based on value. Text Background Colour in a Table Colin Vicary Word 4 08-08-2019 06:02 AM
Word background colour ignores Windows setting wiganken Word 1 07-19-2018 09:25 AM
Changing background colour in table based on value. Changing background colour based on dropdown choice PLeo Word VBA 2 08-03-2017 07:40 AM
Trying to clear the background colour from a theme ezekiel181 Word 1 11-14-2010 07:29 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:26 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft