Print range in Word Please help
From: Paulina Lui (paulina_lui_at_hotmail.com)
Date: 08/17/04
- Next message: Chad DeMeyer: "Re: WORD document object model"
- Previous message: Wayne: "Re: Word automation, best course of action"
- Next in thread: Cindy M -WordMVP-: "Re: Print range in Word Please help"
- Reply: Cindy M -WordMVP-: "Re: Print range in Word Please help"
- Reply: Paulina Lui: "Re: Print range in Word Please help"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 17 Aug 2004 11:52:46 -0700
I am trying to print a range of pages using word but have not been able to
do that, no matter what.
I am not sure how to pass the paramaters for the page range option, so any
suggestions are very much appreciated.
I am calling the print out method like this
Doc.PrintOut(covFalse, // Background.
covOptional, // Append.
covOptional, // Range.
covOptional, // OutputFileName.
covOptional, // // From.
covOptional, // // To.
covOptional, // Item.
COleVariant((long)1), // Copies.
covOptional, // Pages.
covOptional, // PageType.
covOptional, // PrintToFile.
covOptional, // Collate.
covOptional, // ActivePrinterMacGX.
covOptional, // ManualDuplexPrint.
covOptional, // PrintZoomColumn New with Word 2002
covOptional, // PrintZoomRow ditto
covOptional, // PrintZoomPaperWidth ditto
covOptional);
Well this print out fine, but when I try to pass the params for range, it
fails, and if I try to use Pages param instead of from/to, then it still
prints the whole document.
I have tried passing the range as
VARIANT vName;
vName.vt = VT_BSTR;
vName.bstrVal = SysAllocString(L"WdPrintOutRange.wdPrintFromTo");
and the from/to as (long) 1/(long) 2, but it failed, so then Ipassed the
pages options as below
VARIANT vName2;
vName2.vt = VT_BSTR;
vName2.bstrVal = SysAllocString(L"1-2");
But it instead prints the whole doc.
Please help!
Pauli
- Next message: Chad DeMeyer: "Re: WORD document object model"
- Previous message: Wayne: "Re: Word automation, best course of action"
- Next in thread: Cindy M -WordMVP-: "Re: Print range in Word Please help"
- Reply: Cindy M -WordMVP-: "Re: Print range in Word Please help"
- Reply: Paulina Lui: "Re: Print range in Word Please help"
- Messages sorted by: [ date ] [ thread ]