Exemplo n.º 1
0
 /// <summary>
 /// Sets all internal state back to null
 /// </summary>
 private void ResetState()
 {
     m_presentation     = null;
     m_originalFileName = null;
     m_newFileName      = null;
     m_statusFileName   = null;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Opens the original word file and initializes the Word.Document object.
 /// The original file may be HTML, DOC, or RTF
 /// </summary>
 private void OpenDocument()
 {
     // Open the presentation (ppt file) based on the given file name
     // Note that the last parameter determines whether the
     // presentation should be opened within a visible window,
     // which in our case in "false".  Since in PowerPoint no
     // hiding of app is allowed ( i.e."pptApp.Visible = falseFlag;"
     //  won't work), we should not call pptApp.Activate();
     m_presentation = m_pptApp.Presentations.Open(m_originalFileName, MS_FALSE,
                                                  MS_FALSE, MS_FALSE);
 }
Exemplo n.º 3
0
        /// <summary>
        /// Saves the document out with the appropriate new filename and format.
        /// Also does any special handling such as accepting/rejecting changes
        /// before saving.
        /// </summary>
        private void SaveDocument()
        {
            m_presentation.SaveAs(m_newFileName, m_newFormatType, MS_FALSE);
            try
            {
                m_presentation.Close();
            }
            catch (Exception e)
            {
                Logger.LogError("Failed to close powerpoint presentation", e);
            }

            m_presentation = null;
        }