protected override OfficeDocument Open(System.IO.FileInfo file, String contentid, String rep) { string filedocxtoOpen = file.FullName; if (file.Extension.Equals(HtmlExtension, StringComparison.CurrentCultureIgnoreCase) || file.Extension.Equals(".htm", StringComparison.CurrentCultureIgnoreCase)) { FileInfo docFile = new FileInfo(file.FullName.Replace(file.Extension, ".ppt")); if (docFile.Exists) { filedocxtoOpen = docFile.FullName; } } PowerPoint.Presentation presentation = application.Presentations.Open(filedocxtoOpen, Office.MsoTriState.msoFalse, Office.MsoTriState.msoFalse, Office.MsoTriState.msoTrue); PowerPoint2003OfficeDocument officeDocument = new PowerPoint2003OfficeDocument(presentation); officeDocument.SaveContentProperties(contentid, rep); return(officeDocument); }
private void ActivateDocument(Microsoft.Office.Interop.PowerPoint.Presentation presentation) { OfficeDocument officeDocument = new PowerPoint2003OfficeDocument(presentation); if (officeDocument.IsPublished) { if (MenuListener != null) { OfficeApplication.MenuListener.DocumentPublished(); } } else { if (MenuListener != null) { OfficeApplication.MenuListener.NoDocumentPublished(); } } }