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"
> 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
> >>
> >>
> >> >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.
> >>
>
>
>