Solved

Automate printing selected sections in a protected Word form

Posted on 2008-06-23
2
238 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

690 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