(newbie) (repost frm mpwv.general) How to OMIT specific pages whileprinting

A

Abhinav

Clarifying from another id ..
Hi All,

I know a wee bit of vba but not much .. and most of it in excel.

I have a word document, with many pages having paragraphs with the
text <<not applicable>>.
In effect, <<Not Applicable>> will be present beneath a "Heading" Style.
I have "Heading 1" to "Heading 9" Defined. It could be under any of them..

Hence the requirement is :

If the page contains <<Not Applicable>> and NOTHING Else, Omit the page
while printing.


Thanks for your Help !!

Abhinav
 
J

Jezebel

Re-phrase the question: the task is to determine not the pages to be
omitted, but the pages to be included. Iterate the pages and as you go,
create a string containing the page numbers to be printed, separated by
commas: "2, 3, 4, 6, 9, ..." Use that string as the Pages argument to the
Print dialog.
 
W

Word Heretic

G'day Abhinav <[email protected]>,

Maybe someone on here will have the time to code this properly for
you, I don't I'm sorry. The method is a bit tricky:


We do a find for the text (N/A) and get the
selection.information(page)

Collapse to the start and move back two chars
If char has same pageno as the text, its NOT the only thing on page
If it is the only thing, collapse to the end and move forward two
chars. If char has same pageno as the text, its NOT the only thing on
the page.


Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Abhinav reckoned:
 

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