LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting properties of printing in Excel

Hello,

 

I am working with Excel through ActiveX and I am trying to set the properties of printing an Excel file to PDF file. I managed to print the document but I cannot change the default properties. I write data in many columns and when I print the document, all the columns are not printed. Specifically I want to scale the document to print. This is how I am trying:

 

 

SetPrintAttribute(ATTR_EJECT_AFTER, 0);

SetPrintAttribute (ATTR_PRINT_AREA_WIDTH, VAL_INTEGRAL_SCALE);

SetPrintAttribute(ATTR_EJECT_AFTER, 1);

 

error_print_excel = Excel_Worksheet_PrintOut (ExcelWorksheetHandle, NULL, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, CA_DEFAULT_VAL);

 

Can anyone help me? Thanks in advance.

0 Kudos
Message 1 of 1
(4,102 Views)