Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-06-2014, 06:13 PM
macropod's Avatar
macropod macropod is offline How to dismiss/avoid warning/alert dialog boxes in Microsoft.Office.Interop.Word.Document Windows 7 64bit How to dismiss/avoid warning/alert dialog boxes in Microsoft.Office.Interop.Word.Document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by meenagrace View Post
When I try to compare documents using Microsoft.Office.Interop.WordApplication.CompareDo cuments in C# , warning dialog box is displayed. how to close/avoid that dialog box programmatically.
Without knowing what the warning dialog box is, it's impossible to say. The following runs to conclusion in VBA without any warning dialog boxes being displayed.
Code:
Sub Demo()
Dim DocOld As Document, DocRev As Document, DocCmp As Document
Set DocOld = Documents.Open("C:\Users\" & Environ("UserName") & "\Documents\Original.docx", AddToRecentFiles:=False, Visible:=False)
Set DocRev = Documents.Open("C:\Users\" & Environ("UserName") & "\Documents\Modified.docx", AddToRecentFiles:=False, Visible:=False)
Set DocCmp = Application.CompareDocuments(OriginalDocument:=DocOld, RevisedDocument:=DocRev, Destination:=wdCompareDestinationNew)
DocOld.Close False: DocRev.Close False
DocCmp.Activate
End Sub
For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm
For Mac macro installation & usage instructions, see: http://word.mvps.org/Mac/InstallMacro.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
word 2010

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save as and Open dialog boxes blank stuartmush Word 1 09-20-2013 03:04 PM
Asian typography in text boxes - how to avoid lines starting with periods markpete Word 0 11-17-2012 01:45 PM
Unable to cast COM object of type Microsoft.Office.Interop.Excel.ApplicationClass manishjoisar Excel Programming 0 03-01-2012 02:53 AM
How to dismiss/avoid warning/alert dialog boxes in Microsoft.Office.Interop.Word.Document How do I get rid of a password in a Microsoft Office document? Antonio Machado Word 1 08-11-2010 02:29 AM
Font size in dialog boxes nannycheryl Word 0 07-10-2010 09:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft