This is probably a dumb question, but how can you prevent a button on a document from printing? I can find the property on Excel sheets but seem unable to set it in Word.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Preventing controls printing (Word97sr2 VBA)
Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Preventing controls printing (Word97sr2 VBA)
- This topic has 6 replies, 5 voices, and was last updated 23 years, 8 months ago.
AuthorTopicWSEwan Deans
AskWoody LoungerSeptember 13, 2001 at 4:30 pm #360313Viewing 1 reply threadAuthorReplies-
WSWebGenii
AskWoody Lounger -
mvpjjf
AskWoody PlusSeptember 14, 2001 at 1:56 am #542383Just so happens it’s in the FAQ…
-
WSEwan Deans
AskWoody LoungerSeptember 15, 2001 at 12:24 am #542563Thanks for the replies. I think i need to explain a bit more…
I’m generating a multi-choice exam using an excel database of questions and responses. A VBA routine randomly selects a requested number of unique questions and scrambles the answers. A Word doc is used to hold the questions and answers, plus any graphic and the correct response. So the whole list of questions would be in the format:-Some question here?
Response A goes here
Response B goes here
Response C goes here
Response D goes here
Correct reponse is: A – DThe questions are formated as Heading 1style, the choices as Heading 2 style and the correct response para (which also holds any inline graphic) as Heading 3 style. Headings 1 and 2 are set up to outline number and Heading 3 has no number but does have a bottom border. The whole thing works very well, with all questions and responses automatically numbering and lettering plus any graphics below the last reponse being exactly the same width as the column. To toggle between hiding and showing the correct answers i placed a toggle button at the top of the first page to switch the font colour of the Heading 3 style between white and auto.
I checked the FAQ and the text box technique is intresting (if a pain in the ass) but it assumes i want a button for printing. To get the sample code to work i would need to place a button on the document for printing. I even checked for event procedures like Before_print in excel, but no luck. All these things that are in one App but not another is enough to drive you
!!
-
WSjscher2000
AskWoody LoungerSeptember 15, 2001 at 1:32 am #542569Okay, this really is cheating, but… how about putting a section break after the button and then only printing Section 2? I have a couple different automated Word solutions where the first section is data collection and plumbing, and Section 2 is the beautiful result.
If that doesn’t work for you, how about hidden text? I am used to viewing hidden text, so it seems quite natural to me to use the hidden text attribute for that paragraph so it doesn’t print. However, I don’t know whether your users view hidden text. If not, they won’t see the button. This could be toggled in a Document_New or Document_Open macro, if you don’t mind messing with the user’s settings. (Storing the original value to restore on close is not a perfect solution because the user might work with other documents while your document is open…)
All I can think of at the moment.
-
WSEwan Deans
AskWoody LoungerSeptember 15, 2001 at 4:12 pm #542601I’ve decided to use a check box. It’s more discrete than some big grey toggle button and doesn’t require playing around with user settings (which can upset some!!) or putting buttons on the document to specifically hide controls during printing/print certain sections. I am assuming there is no equivalent to a print range in Excel, where once you name it you can leave it alone.
Thanks for the input everyone,
Ewan
P.S. Could start a whole new thread on features in one office app that should be in the others!! -
WSGary Frieder
AskWoody Lounger
-
-
-
-
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
AI is good sometimes
by
Susan Bradley
53 seconds ago -
Mozilla quietly tests Perplexity AI as a New Firefox Search Option
by
Alex5723
1 hour, 3 minutes ago -
LibreOffice 25.8. No Windows 7, 8/8.1, x86
by
Alex5723
4 hours, 5 minutes ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
20 hours, 2 minutes ago -
June KB5060842 update broke DHCP server service
by
Alex5723
18 hours, 33 minutes ago -
AMD Ryzen™ Chipset Driver Release Notes 7.06.02.123
by
Alex5723
22 hours, 36 minutes ago -
Excessive security alerts
by
WSSebastian42
1 hour ago -
* CrystalDiskMark may shorten SSD/USB Memory life
by
Alex5723
1 day, 8 hours ago -
Ben’s excellent adventure with Linux
by
Ben Myers
1 hour, 23 minutes ago -
Seconds are back in Windows 10!
by
Susan Bradley
19 hours, 13 minutes ago -
WebBrowserPassView — Take inventory of your stored passwords
by
Deanna McElveen
1 hour, 46 minutes ago -
OS news from WWDC 2025
by
Will Fastie
5 hours, 21 minutes ago -
Need help with graphics…
by
WSBatBytes
3 hours, 23 minutes ago -
AMD : Out of Bounds (OOB) read vulnerability in TPM 2.0 CVE-2025-2884
by
Alex5723
1 day, 23 hours ago -
Totally remove or disable BitLocker
by
CWBillow
22 hours, 40 minutes ago -
Windows 10 gets 6 years of ESU?
by
n0ads
1 day, 1 hour ago -
Apple, Google stores still offer China-based VPNs, report says
by
Nibbled To Death By Ducks
2 days, 10 hours ago -
Search Forums only bring up my posts?
by
Deo
4 hours, 45 minutes ago -
Windows Spotlight broken on Enterprise and Pro for Workstations?
by
steeviebops
2 days, 22 hours ago -
Denmark wants to dump Microsoft for Linux + LibreOffice
by
Alex5723
2 days, 14 hours ago -
How to get Microsoft Defender to honor Group Policy Setting
by
Ralph
2 days, 22 hours ago -
Apple : Paragon’s iOS Mercenary Spyware Finds Journalists Target
by
Alex5723
3 days, 8 hours ago -
Music : The Rose Room – It’s Been A Long, Long Time album
by
Alex5723
3 days, 9 hours ago -
Disengage Bitlocker
by
CWBillow
2 days, 23 hours ago -
Mac Mini M2 Service Program for No Power Issue
by
Alex5723
3 days, 11 hours ago -
New Win 11 Pro Geekom Setup questions
by
Deo
4 hours, 49 minutes ago -
Windows 11 Insider Preview build 26200.5651 released to DEV
by
joep517
3 days, 19 hours ago -
Windows 11 Insider Preview build 26120.4441 (24H2) released to BETA
by
joep517
3 days, 19 hours ago -
iOS 26,, MacOS 26 : Create your own AI chatbot
by
Alex5723
3 days, 23 hours ago -
New PC transfer program recommendations?
by
DaveBoston
2 days, 3 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.