Group: microsoft.public.word.vba.general
From: "Doug Robbins - Word MVP"
Date: Thursday, February 21, 2008 5:10 PM
Subject: Re: Making a check box that will automatically put in check when c

Try

With ActiveDocument
If .FormFields("Dropdown1").Result = "Other" Then
.FormFields("Text1").Range.Font.Hidden = False
Else
.FormFields("Text1").Range.Font.Hidden = True
SendKeys "{Tab}"
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Jen Woodall" wrote in message
news:7D931FA6-1C7E-4BDE-BC9B-89B3A3EBE8B8@microsoft.com...
> That works, but when tabbing thru the document I still land on that text
> line. Is there a way to make it skip that one?
>
> "Doug Robbins - Word MVP" wrote:
>
>> With ActiveDocument
>> If .FormFields("Dropdown1").Result = "Other" Then
>> .FormFields("Text1").Range.Font.Hidden = False
>> Else
>> .FormFields("Text1").Range.Font.Hidden = True
>> End If
>> End With
>>
>> Start with the font of the Text1 formfield formatted as hidden.
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "Jen Woodall" wrote in message
>> news:22E8BDBD-D1FA-4CF7-91D3-71BF48FBE3A5@microsoft.com...
>> > You are awesome. Thank-you!
>> > My next question is;
>> >
>> > I have a drop down box with an "other" option. When the other option
>> > is
>> > chosen I want a text field to appear. Is this possible? I guess the
>> > first
>> > part could be
>> > If ActiveDocument.FormFields(bk).DropDown.Value = other then
>> > ???
>> > "Doug Robbins - Word MVP" wrote:
>> >
>> >> If you insert a textbox type formfield where you have the bookmark,
>> >> with
>> >> that bookmark name being assigned to the formfield, you can use the
>> >> .Result
>> >> attribute of the formfield to load the information into it, which can
>> >> be
>> >> done without unprotecting the document
>> >>
>> >> With ActiveDocument
>> >> If .FormFields("bkIH").CheckBox.Value = True Then
>> >> .FormFields ("bkIHadd").Result= "1212 Second Street N.
>> >> Cranbrook,
>> >> BC
>> >> V1C 4T6"
>> >> End If
>> >> End With
>> >>
>> >>
>> >> --
>> >> Hope this helps.
>> >>
>> >> Please reply to the newsgroup unless you wish to avail yourself of my
>> >> services on a paid consulting basis.
>> >>
>> >> Doug Robbins - Word MVP
>> >>
>> >> "Jen Woodall" wrote in message
>> >> news:E0E0C632-1BE5-499D-BD5C-B853BD2AAF96@microsoft.com...
>> >> >I have set another text form field with a bookmark for the text to
>> >> >appear
>> >> >in.
>> >> > I am using a protected document and I tried to set up a code for
>> >> > unprotecting and reprotecting the document.
>> >> > This is what I've done:
>> >> > Sub pToggleProtectDoc()
>> >> >
>> >> > If ActiveDocument.ProtectionType = wdNoProtection Then
>> >> > ActiveDocument.Protect
>> >> > Else
>> >> > ActiveDocument.Unprotect
>> >> > End If
>> >> >
>> >> > End Sub
>> >> > Sub IH()
>> >> > pToggleProtectDoc
>> >> >
>> >> > ' IH Macro
>> >> > If ActiveDocument.FormFields("bkIH").CheckBox.Value = True Then
>> >> > ActiveDocument.Bookmarks("bkIHadd").Range.Text = "1212 Second
>> >> > Street
>> >> > N.
>> >> > Cranbrook, BC V1C 4T6"
>> >> >
>> >> > End If
>> >> > pToggleProtectDoc
>> >> >
>> >> > End Sub
>> >> >
>> >> > But it is still telling me that the macros are disabled. ???
>> >> >
>> >> > "Doug Robbins - Word MVP" wrote:
>> >> >
>> >> >> Where do you want the instructions to appear? In the actual
>> >> >> document
>> >> >> or
>> >> >> as
>> >> >> a message box on the screen. Also what type of form is this? A
>> >> >> document
>> >> >> containing formfields that is protected, or a custom dialog
>> >> >> (UserForm).
>> >> >>
>> >> >> For the former, say you have a Checkbox to which has been assigned
>> >> >> the
>> >> >> bookmark "Check1", if you set a macro containing the following code
>> >> >> to
>> >> >> be
>> >> >> run on exit from that checkbox (access the Properties dialog of
>> >> >> that
>> >> >> formfield to do this), a message will be display when the user
>> >> >> checks
>> >> >> that
>> >> >> box and exits from it
>> >> >>
>> >> >> If ActiveDocument.FormFields("Check1").CheckBox.Value = True Then
>> >> >> MsgBox "Here is a message."
>> >> >> End If
>> >> >>
>> >> >> --
>> >> >> Hope this helps.
>> >> >>
>> >> >> Please reply to the newsgroup unless you wish to avail yourself of
>> >> >> my
>> >> >> services on a paid consulting basis.
>> >> >>
>> >> >> Doug Robbins - Word MVP
>> >> >>
>> >> >> "Jen Woodall" wrote in
>> >> >> message
>> >> >> news:619A08CB-0E42-4311-BA65-9B24F810A8B0@microsoft.com...
>> >> >> >I would like to make a form with check boxes that when clicked
>> >> >> >additional
>> >> >> > text appears. IE. if you click "yes" than instructions for "yes"
>> >> >> > appear.
>> >> >> > Any tips for this?
>> >> >> >
>> >> >> > "Jay Freedman" wrote:
>> >> >> >
>> >> >> >> On Mon, 18 Feb 2008 15:19:02 -0800, d.carlin
>> >> >> >> wrote:
>> >> >> >>
>> >> >> >> >We are making a form that will be filled out on the internet
>> >> >> >> >and
>> >> >> >> >must
>> >> >> >> >have a
>> >> >> >> >check box that will put a check mark into the box when clicked
>> >> >> >> >on.
>> >> >> >> >The
>> >> >> >> >directions from "help" are not making it happen. The form has
>> >> >> >> >been
>> >> >> >> >created
>> >> >> >> >and the check boxes added to it, could this be the problem?
>> >> >> >> >How
>> >> >> >> >to
>> >> >> >> >fix?
>> >> >> >> >HELP!
>> >> >> >>
>> >> >> >> See http://gregmaxey.mvps.org/Add_Toggle_Objects.htm.
>> >> >> >>
>> >> >> >> --
>> >> >> >> Regards,
>> >> >> >> Jay Freedman
>> >> >> >> Microsoft Word MVP FAQ: http://word.mvps.org
>> >> >> >> Email cannot be acknowledged; please post all follow-ups to the
>> >> >> >> newsgroup
>> >> >> >> so all may benefit.
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>