ExportAsFixedFormat returns with error code 8004005

G

Gordon

Hi,
I've got some C# code that uses PowerPoint 2007 and tries to save a PPT
file as a PDF file. When I do this from the GUI everything works just fine.
But from C# I get the small "Publishing..." dialog box, and after about the
right amount of time PowerPoint returns control to my program with an error
message that really doesn't help me solve the problem. Here is the code that
that does the work:

powerApp = new Application();
presentation =
powerApp.Presentations.Open(talkInfo.FullName, MsoTriState.msoTrue,
MsoTriState.msoFalse, MsoTriState.msoFalse);
presentation.ExportAsFixedFormat(pdfFile.Name,
PpFixedFormatType.ppFixedFormatTypePDF,
PpFixedFormatIntent.ppFixedFormatIntentPrint,
MsoTriState.msoFalse,
PpPrintHandoutOrder.ppPrintHandoutHorizontalFirst,
PpPrintOutputType.ppPrintOutputSlides,
MsoTriState.msoFalse,
null,
PpPrintRangeType.ppPrintAll,
"",
false,
false,
false,
true,
true,
System.Reflection.Missing.Value);

The error occurs upon return from ExportAsFixedFormat. And the error code
burried in the COM expection is 8004005. I would love to record a macro that
calls this - but I can't find the record macro button in PowerPoint (!?).

Any clues on what I did wrong or how to further debug this would be most
appreciated!

Cheers,
Gordon.
 
G

Gordon

Hi,
A bit embarassing: Installed the new Search 4.0, reboot my Vista system,
and now the same test works without errors. That is a little scary. So,
something else on my system is messing up my system (event logs _looked_
clean). I'll post back if there is anything further. But for now this looks
like it is solved.

Cheers,
Gordon.
 

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