Print content if the box is checked .. if not checked, dont print

  • Thread starter Thread starter Chuck
  • Start date Start date
C

Chuck

hi guys,

as you can tell, a challenge has been set to me to provide a document
with teh ability to only print items associated to the checkbox which
is checked, and not print those items associated to a non checked box

i have googled & searched here for anything related on tutorials or
where to start but have found nothing

can someome advise

if it is possible to do the above? and if so, where can i get
additional information on this?

cheers
chuck
 
hi guys,

i did a bit of more research and found this

=====
http://help.lockergnome.com/office/...ng-enabled-checkbox-fields-ftopict992089.html

Insert a bookmark around section of the text that you might want
deleted and
have a macro that contains the following code run on exit from the
associated checkbox

With ActiveDocument
..Unprotect
If .FormFields("Check1").CheckBox.Value = False Then
..Bookmarks ("CheckBox1Text").Range.Font.Hidden=True
Else
..Bookmarks("CheckBox1Text").Range.Font.Hidden=False
End If
..Protect wdAllowOnlyFormFields, NoReset
End With

Under Tools>Options>View, you will want to have the display of Hidden
Text
enabled so that the user can go back and change their selection and
under
Tools>Options>Print, make sure that the box for Hidden Text is
unchecked so
that text that is so formatted does not print.

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

===================

now, i have created a macro based on the above..

With ActiveDocument
.Unprotect

If .FormFields("Check15").CheckBox.Value = False Then
.Bookmarks("CheckBox15Text").Range.Font.Hidden = True
Else
.Bookmarks("CheckBox15Text").Range.Font.Hidden = False
End If

If .FormFields("Check13").CheckBox.Value = False Then
.Bookmarks("CheckBox13Text").Range.Font.Hidden = True
Else
.Bookmarks("CheckBox13Text").Range.Font.Hidden = False
End If

If .FormFields("Check14").CheckBox.Value = False Then
.Bookmarks("CheckBox14Text").Range.Font.Hidden = True
Else
.Bookmarks("CheckBox14Text").Range.Font.Hidden = False
End If

If .FormFields("Check17").CheckBox.Value = False Then
.Bookmarks("CheckBox17Text").Range.Font.Hidden = True
Else
.Bookmarks("CheckBox17Text").Range.Font.Hidden = False
End If

.Protect wdAllowOnlyFormFields, NoReset

End With

End Sub

i have put this in
Normal > Modules > NewMacros

however, this is not working

can anyone advise what i have done wrong?

cheers
 
ok, now i am at a loss

i have figured out what to do in respect to the above .. however,

some bookmarks are not showing up as bookmarks and for some reason,
one bookmark always stays visible even when it shouldnt

is this a foramtting thing within Word?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top