Printing PowerPoint as PDF -> Param PrintRange fails !!!

F

Filippo

Hi there,
I'm trying to print as PDF a PowerPoint and I need to print Notes and so on.
I am having a problem with the PrintRange parameter as I am not sure how or
what to pass it.

using Microsoft.Office.Interop.PowerPoint;


// OPEN THE POWERPOINT
pptDocument = pptApplication.Presentations.Open("C:\File.ppt",
Microsoft.Office.Core.MsoTriState.msoTrue,
Microsoft.Office.Core.MsoTriState.msoTrue,
Microsoft.Office.Core.MsoTriState.msoFalse);


// PRINT AS PDF
pptDocument.ExportAsFixedFormat("C:\file.pdf",
PpFixedFormatType.ppFixedFormatTypePDF,
PpFixedFormatIntent.ppFixedFormatIntentPrint,
Microsoft.Office.Core.MsoTriState.msoFalse,
PpPrintHandoutOrder.ppPrintHandoutHorizontalFirst,
PpPrintOutputType.ppPrintOutputNotesPages,
Microsoft.Office.Core.MsoTriState.msoFalse,
PRINTRANGE, <<==== PROBLEM
PpPrintRangeType.ppPrintAll,
"", false, true, true, true, false, false);

I am not sure what to pass as PRINTRANGE param. I created a class that
inherits from that interface, I tried "null", I tried Type.Missing ...

Any idea please?

Thanks in advanced,
Filippo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top