View Single Post
 
Old 04-03-2013, 01:40 AM
spk spk is offline Windows 7 64bit Office 2010 32bit
Novice
 
Join Date: Apr 2013
Posts: 6
spk is on a distinguished road
Default Change color according with dropdown selection

Hello,

I'm doing a document with dropdown menus, and I'd like to insert a color code for easy reading.
These dropdows are in a table, so ideally, the the color would apply to the cell background.
The document doesn't need to be protected.

For instance, I've a dropdown named "Material" in a cell of a tab, with two entries: "mat1" and "mat2".
I would like to color the cell background in light blue when "mat1" is selected, and in light green when "mat2" is selected.

I found this:
http://www.wordbanter.com/showthread.php?t=67444
But I don't manage to use it, I get an error run-time '5941' the requested member of the collection does not exist.
The problematic line is:
Select Case ActiveDocument.FormFields("ColorPicker").Result
I replaced "ColorPicker" by the name of my dropdown, I put my dropdown in a bookmark with the same name...

If it works, we would save time and probably avoid mistakes!