Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2007

Tip: Looking for answers? Try searching our database.

Word Form - Disable printing of non-enabled checkbox fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CJ - 11 Jul 2007 15:37 GMT
I have a form designed with a list of five items with a checkbox beside each
item. I need the ability for the end user to choose any or all of the five
checkboxes however, if they only choose the first and the fourth items
listed on the checkbox list, I do not want the second, third, or fifth item
to print.  Is there a way to get the form to NOT print those items not
enabled (checkmarked)?  If so, albeit not as important, is there a way to
then close the gap of white space left when those items do not print?  (If
requested, I can send a Word file sample of the document I am trying to do
this with.)

Thank you for any assistance you can offer.  (Running Windows XP, Office
2003 SP2)
-CJ
Russ - 11 Jul 2007 17:16 GMT
CJ,
I think you are talking about formfields in a document and not userform
dialogs. One way to not print something without a gap in a document is to
create bookmarks for those areas and make all text font and paragraph marks
between the text in those bookmarked areas hidden. As long as an option in
Word to print hidden text is not check, which it isn't by default, then the
gaps should close. It's up to you to design the document in a way that it
still looks good with those areas hidden. You may have to temporarily
unprotect the document, if we are talking about a document with formfiels,
to make those bookmarked areas hidden. When you go into Print Preview mode
you should see how the document will look when printed.
If you are talking about mail merge, then it might be handled differently.

> I have a form designed with a list of five items with a checkbox beside each
> item. I need the ability for the end user to choose any or all of the five
[quoted text clipped - 9 lines]
> 2003 SP2)
> -CJ

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

CJ - 11 Jul 2007 17:48 GMT
Thanks Russ for your prompt response.  Can you direct me to the correct user
group?  I was not aware that a userform is not a form utilizing form fields
or control toolbox.  I also understand your response below on hiding text
(and am aware of how to do that) however, I am not the one that will be
choosing which options to print and which ones not to print.  I'm a legal
assistant and I am trying to create a legal addendum to a contract for use
in the field.  In as simple terms as I can, I'll give the example below of a
form I'm trying to create.
________________________________________________________________________________
                   ADDENDUM
Preamble Text - This addendum is between Us and Customer and modifies the
contract as follows:

[checkbox1] Section Xx is hereby modified to blah blah
[checkbox2] Section N is hereby modified to blah blah
[checkbox3] Section Y is hereby modified to blah blah

Closing terms of agreement and signatures.
__________________________________________________________________________________

Now if the user selects the first option and the third option, is there a
way to have the second option not print?  Or if they only choose one of the
amended options, is there a way to not have the other options print?  They
should have the ability to choose any (or all) the options that apply to
their specific customer.  I also tried a listbox which I could almost get to
work however, several of the options are 300 characters in length and don't
fit in a listbox.

Thanks again!
-CJ

> CJ,
> I think you are talking about formfields in a document and not userform
[quoted text clipped - 29 lines]
>> 2003 SP2)
>> -CJ
Doug Robbins - Word MVP - 12 Jul 2007 03:53 GMT
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.

Signature

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

> Thanks Russ for your prompt response.  Can you direct me to the correct
> user group?  I was not aware that a userform is not a form utilizing form
[quoted text clipped - 65 lines]
>>> 2003 SP2)
>>> -CJ
CJ - 12 Jul 2007 13:50 GMT
I'll give it a shot or at least my best attempt :-)  THANKS for your
response and for applying pieces of your time to these forums helping
everyone!
-CJ

> 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
[quoted text clipped - 87 lines]
>>>> 2003 SP2)
>>>> -CJ
Russ - 12 Jul 2007 04:06 GMT
CJ,
These are the Microsoft word forums:

microsoft.public.word.application.errors
microsoft.public.word.conversions
microsoft.public.word.customization.menustoolbars
microsoft.public.word.docmanagement
microsoft.public.word.drawing.graphics
microsoft.public.word.formatting.longdocs
microsoft.public.word.international.features
microsoft.public.word.internet.assistant
microsoft.public.word.macword2001
microsoft.public.word.macword5-6
microsoft.public.word.macword98
microsoft.public.word.mail
microsoft.public.word.mailmerge.fields
microsoft.public.word.newusers
microsoft.public.word.numbering
microsoft.public.word.oleinterop
microsoft.public.word.pagelayout
microsoft.public.word.printingfonts
microsoft.public.word.programming
microsoft.public.word.setup.networking
microsoft.public.word.spelling.grammar
microsoft.public.word.tables
microsoft.public.word.vba.addins
microsoft.public.word.vba.beginners
microsoft.public.word.vba.customization
microsoft.public.word.vba.general
microsoft.public.word.vba.userforms
microsoft.public.word.web.authoring
microsoft.public.word.word6-7macros
microsoft.public.word.word97vba

If you don't want to use vba, I'd suggest posing 'your not print' question
to mailmerge.fields, pagelayout, docmanagement.

To pose the same question to more than one group, use a comma between each
group name in the 'To:' field:

microsoft.public.word.docmanagement,microsoft.public.word.mailmerge.fields,
microsoft.public.word.pagelayout

Otherwise, I think for those documents you'd have to use vba code to
intercept the print command to hide parts of the text before printing.
I don't know a lot about mail-merge, but I think it could be set up to not
print empty fields.
> Thanks Russ for your prompt response.  Can you direct me to the correct user
> group?  I was not aware that a userform is not a form utilizing form fields
[quoted text clipped - 62 lines]
>>> 2003 SP2)
>>> -CJ

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.