Click here to Skip to main content
15,886,720 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: help needed Pin
David Crow19-Sep-05 7:55
David Crow19-Sep-05 7:55 
GeneralRe: help needed Pin
Laffis19-Sep-05 10:40
Laffis19-Sep-05 10:40 
QuestionGet Font Path Pin
RamL19-Sep-05 3:16
RamL19-Sep-05 3:16 
AnswerRe: Get Font Path Pin
Graham Bradshaw19-Sep-05 6:39
Graham Bradshaw19-Sep-05 6:39 
QuestionCOM address independence? Pin
Anonymous19-Sep-05 2:42
Anonymous19-Sep-05 2:42 
AnswerRe: COM address independence? Pin
RChin19-Sep-05 3:32
RChin19-Sep-05 3:32 
Questionhow to delete a socket Pin
jianxin080519-Sep-05 2:41
jianxin080519-Sep-05 2:41 
QuestionPrinting files using MS Word automation Pin
Member 64506719-Sep-05 2:18
Member 64506719-Sep-05 2:18 
Hello,
I need to print files using MS Word automation and MFC. I use the PrintOut method available in the application object and it prints perfectly fine. But i'm not finding any method of printing files to a particular tray of the printer.


Code for the same is attached
******************************************************************************
Word::_ApplicationPtr m_pWord;
Word::_DocumentPtr m_pDoc;

/* ms-word print api */
m_pWord->ActiveDocument->PrintOut(covFalse, // Background.
covOptional, COleVariant((long)4), // Range.
covOptional, // OutputFileName.
covOptional, // From.
covOptional, // To.
covOptional, // Item.
COleVariant((long)1), // Copies.
COleVariant(PageRange ,VT_BSTR), // Pages.
covOptional, // PageType.
covOptional, // PrintToFile.
covOptional, // Collate.
covOptional, // ActivePrinterMacGX.
covOptional, // ManualDuplexPrint.
covOptional, // PrintZoomColumn New with Word 2002
covOptional, // PrintZoomRow ditto
covOptional, // PrintZoomPaperWidth ditto
covOptional
);
******************************************************************************



For tray selection am using the following methods, but the desired results are not being achieved. The mentioned method is placed before PrintOut function is called.

******************************************************************************
m_pWord->Options->DefaultTrayID = Word::wdPrinterLowerBin;
******************************************************************************


Thanks for any help provided

Vikram Attiganal
QuestionMoving Strings To Resource Pin
abhi_code19-Sep-05 1:26
abhi_code19-Sep-05 1:26 
AnswerRe: Moving Strings To Resource Pin
Maximilien19-Sep-05 2:47
Maximilien19-Sep-05 2:47 
QuestionMoving Strings To Resource Pin
abhi_code19-Sep-05 1:24
abhi_code19-Sep-05 1:24 
QuestionMinimize application on taskbar click Pin
razorbladez19-Sep-05 0:14
razorbladez19-Sep-05 0:14 
AnswerRe: Minimize application on taskbar click Pin
bugDanny19-Sep-05 3:24
bugDanny19-Sep-05 3:24 
GeneralRe: Minimize application on taskbar click Pin
razorbladez19-Sep-05 3:30
razorbladez19-Sep-05 3:30 
GeneralRe: Minimize application on taskbar click Pin
bugDanny19-Sep-05 4:04
bugDanny19-Sep-05 4:04 
GeneralRe: Minimize application on taskbar click Pin
razorbladez19-Sep-05 4:17
razorbladez19-Sep-05 4:17 
QuestionPeekMessage and Sleep in a multi-thread environment Pin
almc19-Sep-05 0:08
almc19-Sep-05 0:08 
AnswerRe: PeekMessage and Sleep in a multi-thread environment Pin
Hans Ruck19-Sep-05 0:50
Hans Ruck19-Sep-05 0:50 
GeneralRe: PeekMessage and Sleep in a multi-thread environment Pin
almc19-Sep-05 1:34
almc19-Sep-05 1:34 
GeneralRe: PeekMessage and Sleep in a multi-thread environment Pin
Hans Ruck19-Sep-05 2:42
Hans Ruck19-Sep-05 2:42 
GeneralRe: PeekMessage and Sleep in a multi-thread environment Pin
almc19-Sep-05 3:40
almc19-Sep-05 3:40 
GeneralRe: PeekMessage and Sleep in a multi-thread environment Pin
Hans Ruck19-Sep-05 4:17
Hans Ruck19-Sep-05 4:17 
AnswerRe: PeekMessage and Sleep in a multi-thread environment Pin
Bob Stanneveld19-Sep-05 1:10
Bob Stanneveld19-Sep-05 1:10 
GeneralRe: PeekMessage and Sleep in a multi-thread environment Pin
almc19-Sep-05 1:37
almc19-Sep-05 1:37 
GeneralRe: PeekMessage and Sleep in a multi-thread environment Pin
Bob Stanneveld19-Sep-05 1:47
Bob Stanneveld19-Sep-05 1:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.