Solved

Automate printing selected sections in a protected Word form

Posted on 2008-06-23
2
235 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

810 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