Print a range

B

Bill Taylor

I have a document that stores 50 or so newsletters. I want to use vba code
to find a key phrase and then either print that page or the newsletter to
which it belongs. For Example: I find the phrase "Thomas Herald receives
award". Now I want to be able to print that page or the entire newsletter in
which that phrase belongs. How do I code to find the beginning and end of
each letter? This will be coded from access and page locations saved to use
as page or range criteria. Do I need to set special indicators for the start
and end of each newsletter?....... can I just search back to news letter
header and next newsletter header?
 
D

Doug Robbins - Word MVP

Hi Bill,

For the page, you could select the .Range of the "\page" bookmark by using

ActiveDocument.Bookmarks("\page").Range.Select

If the newsletters are each in a separate Section, you could use

Selection.Sections(1).Range.Select

and in both cases, Print Out the Selection.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top