Skip to content

Instantly share code, notes, and snippets.

@sergey-tihon

sergey-tihon/PP-Interop.cs Secret

Created Mar 15, 2020
Embed
What would you like to do?
Clippit-intro
public void PublishSlides(string sourceFileName, string resultDirectory)
{
Application ppApp = null;
try
{
ppApp = new Application
{
DisplayAlerts = PpAlertLevel.ppAlertsNone
};
const MsoTriState msoFalse = MsoTriState.msoFalse;
var presentation = ppApp.Presentations.Open(sourceFileName,
msoFalse, msoFalse, msoFalse);
presentation.PublishSlides(resultDirectory, true, true);
presentation.Close();
}
finally
{
ppApp?.Quit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment