public void NavigateComplete2(object sender, AxIEBrowser._IIEBrowserCtlEvents_NavigateCompleteEvent e) { try { if (_cleanup) { if (_cleanupResource != null) { FileResource.CleanupSourceFile(_cleanupResource, _strFileName); } _cleanupResource = null; _cleanup = false; return; } object o = e.document; object oDocument = o.GetType().InvokeMember("Document", BindingFlags.GetProperty, null, o, null); _document = (Word._Document)oDocument; _navigateComplete = true; if (_highlightWords == true) { HighlightWords(); _navigateComplete = false; _highlightWords = false; } } catch (Exception exception) { _tracer.TraceException(exception); } }
private void NavigateComplete2(object sender, AxIEBrowser._IIEBrowserCtlEvents_NavigateCompleteEvent e) { object o = e.document; object oDocument = o.GetType().InvokeMember("Document", BindingFlags.GetProperty, null, o, null); _presentation = (PowerPoint.Presentation)oDocument; _navigateComplete = true; if (_highlightWords == true) { HighlightWords(); _navigateComplete = false; _highlightWords = false; } }