View Single Post
  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Charles Kenyon Charles Kenyon is offline
external usenet poster
 
Posts: 276
Default forms, formatting, etc

What follows is an on-exit macro for the checkbox named chkThirdParty. It
changes both the bold and the double-strikethrough features of bookmarked
text.

Sub ThirdParty()
'
' ThirdParty Macro
' OnExit Macro for Third-Party Checkbox
' "&chr(10)&"Macro written 05/16/2001 by Charles Kyle Kenyon
'
Dim rRange As Range
With ActiveDocument
UnProtectSubpoena 'subroutine below
Set rRange = .Bookmarks("ThirdPartyLanguage").Range
rRange.Font.DoubleStrikeThrough = _
Not .FormFields("chkThirdParty").CheckBox.Value
rRange.Font.Bold = _
.FormFields("chkThirdParty").CheckBox.Value
.Protect wdAllowOnlyFormFields, True, sPass
End With
End Sub


If the box is checked, it undoes the double-strikethrough and bolds the
text, otherwise it is stricken and not bold. It might be possible to do this
with an IF field without a macro, but I'm not sure how. Hope this is
helpful.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!

My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.


"nat_h45" wrote in message
...
Each of the list below from a protected form will have a checkbox beside
it.
How do I make it so that when the checkbox is left unticked that the
corresponding item will be strikethrough?


PASSENGER SHIP
PASSENGER HIGH-SPEED CRAFT
CARGO HIGH-SPEED CRAFT
BULK CARRIER
OIL TANKER
CHEMICAL TANKER
GAS CARRIER
MOBILE OFFSHORE DRILLING UNIT
OTHER CARGO SHIP (N/A)

Many thanks