Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
"Conditional formatting" in Word drop-down form fields
Word 2000, Windows XP.
Hi, I'm working with drop-down form fields placed in word table cells. Each drop-down formfield has the selections red, yellow and green. I'm looking for the code to the on exit macro so that the color of the cell turn red if red is selected and so on...after the selection it should go to the next form field. The document should unprotect, format the cell, then protect again without resetting and jump to the next form field. Thanks in advance... |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
"Conditional formatting" in Word drop-down form fields
Hi ?B?QmVuamFtaW4=?=,
I'm working with drop-down form fields placed in word table cells. Each drop-down formfield has the selections red, yellow and green. I'm looking for the code to the on exit macro so that the color of the cell turn red if red is selected and so on...after the selection it should go to the next form field. The document should unprotect, format the cell, then protect again without resetting and jump to the next form field. Yes. Have you tried recording these actions in a macro? Do so, copy the result into a reply, and explain what part doesn't work. (We can then show you how to make the color selection.) Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
"Conditional formatting" in Word drop-down form fields
I'm not sure how to record a macro when the form protection has been activated.
The macro I've been trying (see below) seems to be working when I tab through the cells, but if I jump to new form fields using the mouse, Word crashes at a point: Sub ColorField() ProtectDoc 'macro to protect and unprotect Selection.SelectCell DropdownName = Selection.FormFields(1).Name If ActiveDocument.FormFields(DropdownName).Result = "Red" Then With Selection.Cells With .Shading .BackgroundPatternColor = wdColorRed End With End With ElseIf ActiveDocument.FormFields(DropdownName).Result = "Yellow" Then .. .. .. .. End If ProtectDoc ActiveDocument.FormFields(DropdownName).Select End Sub Sub ProtectDoc() If ActiveDocument.ProtectionType = wdNoProtection Then ActiveDocument.Protect _ Type:=wdAllowOnlyFormFields, NoReset:=True Else ActiveDocument.Unprotect End If End Sub "Cindy M." wrote: Hi ?B?QmVuamFtaW4=?=, I'm working with drop-down form fields placed in word table cells. Each drop-down formfield has the selections red, yellow and green. I'm looking for the code to the on exit macro so that the color of the cell turn red if red is selected and so on...after the selection it should go to the next form field. The document should unprotect, format the cell, then protect again without resetting and jump to the next form field. Yes. Have you tried recording these actions in a macro? Do so, copy the result into a reply, and explain what part doesn't work. (We can then show you how to make the color selection.) Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why dont MS just f**king re-write Word from scratch? Its dogsh*t | Microsoft Word Help | |||
Drop Down Menus Items Displaying Specific Content | Microsoft Word Help | |||
Change paper size; Word changes to invalid margins | New Users | |||
WP merge file to Word | Tables | |||
In Word, how can I see all files (*.*) in "save as"? | New Users |