-
September 6th, 2012, 09:29 PM
#1
How to programatically close Microsoft Word dialog boxes
I'm using C# with .Net 4.0 in Visual Studio 2010 and the Process class to kick off Microsoft Word 2010 from the command with command line options. Occasionally Word dies and when restarted displays dialog boxes that need to be closed. I would like to automate closing the dialog boxes and am looking for ideas.
Can I use Microsoft.Office.Interop.Word or Microsoft.Office.Tools.Word to start Word with command line options and check and respond to dialog boxes?
-
September 9th, 2012, 06:32 AM
#2
Re: How to programatically close Microsoft Word dialog boxes
idk about responding to them, but you can generally avoid having them pop up in the first place when using interop with:
Code:
oWord = new Word.Application();
oWord.DisplayAlerts = Word.WdAlertLevel.wdAlertsNone;
Good luck!
-
September 9th, 2012, 01:35 PM
#3
Re: How to programatically close Microsoft Word dialog boxes
Interesting. Not sure this will work for me. The dialogs appear because the winword app process was killed after a timeout period. It was running with certain add-ins that the subsequent run prompts the user to disable. I'm not sure that this approach will retain the add-ins.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|