PDFを生成する自動化コードがあります
Microsoft.Office.Interop.PowerPoint.Application objApp;
Microsoft.Office.Interop.PowerPoint.Presentations objPresSet;
Microsoft.Office.Interop.PowerPoint._Presentation objPres;
Microsoft.Office.Interop.PowerPoint.Slides objSlides;
Microsoft.Office.Interop.PowerPoint.Slide CurSlide;
objApp = new Microsoft.Office.Interop.PowerPoint.Application();
// code stuff to write to PPT slides
次に、エクスポート部分:
Microsoft.Office.Interop.PowerPoint.Application ppApp = new Microsoft.Office.Interop.PowerPoint.Application();
ppApp.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;
Microsoft.Office.Interop.PowerPoint.Presentations oPresSet = ppApp.Presentations;
Microsoft.Office.Interop.PowerPoint._Presentation oPres;
ppApp = new Microsoft.Office.Interop.PowerPoint.Application();
oPres = ppApp.Presentations.Open(sourcepath, MsoTriState.msoTrue, MsoTriState.msoFalse, MsoTriState.msoFalse);
oPres.SaveAs(Targetpath, PpSaveAsFileType.ppSaveAsPDF, Microsoft.Office.Core.MsoTriState.msoTrue);
エクスポートでは、コードは保存された PPT を開きますが、現在実行中のプレゼンテーションは開きません。私の質問は
1) 現在の PPT を PDF として開く方法は?(i.e converting it to PDF before saving it)
皆さん、ありがとうございました