void RoundTripCheck_Click(Microsoft.Office.Core.CommandBarButton Ctrl, ref bool CancelDefault) { if (!HookDocumentClose(Application.ActiveDocument)) { return; } Application.System.Cursor = Word.WdCursorType.wdCursorWait; try { WordDocument doc = new WordDocument(Application.ActiveDocument, OfficeTextDocument.ProcessingType.eWordByWord); if (m_aRoundTripCheckWordProcessor == null) { m_aRoundTripCheckWordProcessor = new RoundTripCheckWordProcessor(null); } if (doc.ProcessWordByWord(m_aRoundTripCheckWordProcessor)) { m_aRoundTripCheckWordProcessor = null; } } catch (Exception ex) { DisplayException(ex); } Application.System.Cursor = Word.WdCursorType.wdCursorNormal; }
public void DocumentClosed() { if (m_formFindReplace != null) { m_formFindReplace.Close(); } m_formFindReplace = null; m_aRoundTripCheckWordProcessor = null; }
public void DocumentClosed() { if (m_formFindReplace != null) { m_formFindReplace.Close(); } m_formFindReplace = null; m_aWordByWordProcessor = null; m_aWordByWordFontProcessor = null; m_aWordByWordSpellFixerProcessor = null; m_aWordByWordFontSpellFixerProcessor = null; m_aRoundTripCheckWordProcessor = null; m_aRoundTripCheckFontWordProcessor = null; }
void RoundTripCheckFont_Click(Microsoft.Office.Core.CommandBarButton Ctrl, ref bool CancelDefault) { if (!HookDocumentClose(Application.ActiveDocument)) { return; } Application.System.Cursor = Word.WdCursorType.wdCursorWait; try { WordDocument doc = new WordDocument(Application.ActiveDocument, OfficeTextDocument.ProcessingType.eWordByWord); if (m_aRoundTripCheckFontWordProcessor == null) { // first get the fonts the user wants to process FontConvertersPicker aFCsPicker = new FontConvertersPicker(doc); if (aFCsPicker.ShowDialog() == DialogResult.OK) { FontConverters aFCs = aFCsPicker.SelectedFontConverters; m_aRoundTripCheckFontWordProcessor = new RoundTripCheckWordProcessor(aFCs); } } if (m_aRoundTripCheckFontWordProcessor != null) { if (doc.ProcessWordByWord(m_aRoundTripCheckFontWordProcessor)) { m_aRoundTripCheckFontWordProcessor = null; } } } catch (Exception ex) { DisplayException(ex); } Application.System.Cursor = Word.WdCursorType.wdCursorNormal; }
void RoundTripReset_Click(Microsoft.Office.Core.CommandBarButton Ctrl, ref bool CancelDefault) { m_aRoundTripCheckWordProcessor = null; m_aRoundTripCheckFontWordProcessor = null; }