Solved

Automate printing selected sections in a protected Word form

Posted on 2008-06-23
2
233 Views
Last Modified: 2010-04-21
Hi,

I am using MS Word 2003.  I have created a protected form with several pages and sections.  I have a section towards the middle of the form that contains internet links and instructions about the form.   I would prefer that this section doesn't print when the completed form is printed by the users.  I know that you can include or exclude sections and pages using the print form page range feature.  But, is there a way to exclude this section automatically (maybe using some VB code) so that my users don't have to be reminded to use the page range feature to exclude this section?

Thanks.
0
Comment
Question by:Delano29
2 Comments
 
LVL 9

Accepted Solution

by:
JonMny earned 500 total points
ID: 21848578
You could use the before print to set the range.

Public WithEvents oApp As Word.Application


Private Sub oApp_DocumentBeforePrint(ByVal Doc As Document, Cancel As Boolean)
'add code to set range here
End Sub


see link

http://word.mvps.org/faqs/macrosvba/AppClassEvents.htm
0
 

Author Closing Comment

by:Delano29
ID: 31469806
Thanks for pointing me in the right direction.  I'll look into the info. in the link as well and do some experimenting.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now