PDA

View Full Version : Print all pages except an envelope in Word 2003



gravyface
04-24-2008, 04:24 PM
Hello all,

Been looking through the MSDN VBA reference, and I'm not sure how to get this to work. In pseudo-code, I thought I could do something like:

While(ActiveDocument.Pages.Item.Type != "Envelope")
PrintOut
..

or perhaps even iterate through each page, check it's type, and if envelope, discard page number, else add to array or collection of some kind, and then use that to set the page range to print in the PrintOut method.

Client has tons of documents saved with the last page being the envelope.
Problem is, that's not consistent -- they've been saving the documents
without the envelope attached for the last half year so I can't just print
everything but the last page.

Any ideas?

TIA