Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing all pages from a MS Word document ?

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
I'm using the following syntax :

Word.Application Word_App = null;
Word.Document Word_doc = null;
Word.Documents Docs = null;

object oTrue = true;
object oFalse = false;
object oMissing = System.Reflection.Missing.Value;
object oPrintRange = Word.WdPrintOutRange.wdPrintAllDocument;
object oPrintItems = Word.WdPrintOutItem.wdPrintDocumentContent;
object oPrintCopies = "1";
object oPrintPages = "1";
object oPrintPageType = Word.WdPrintOutPages.wdPrintAllPages;

When I make use of the following command :

Doc1.PrintOut(ref oTrue, ref oFalse, ref oPrintRange,
ref oMissing, ref oMissing, ref oMissing,
ref oPrintItems, ref oPrintCopies, ref oPrintPages,
ref oPrintPageType, ref oFalse,
ref oTrue, ref oMissing, ref oFalse, ref oMissing,
ref oMissing, ref oMissing, ref oMissing);

I only ever get the first page of the intended document.

I've tried setting the value of
object oPrintPages = Word.WdPrintOutPages.wdPrintAllPages;
but see no difference.

Can anyone suggest what I'm doing wrong ?
How can I get all pages within the document to print ?

Thanks in advance
Steve


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top