Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 825
  • Last Modified:

Handle Word Input Dialogue box by Application

Hi,

I am working on an application which has automation with Microsoft Word. The issue is with the user input dialogue box which appears in document while processing and that interrupts the process and wait for the user input.  

For Example:
While opening a doc file from application for process, a dialogue box appears from MS Word for input. Please see the attached image file for dialogue box type.


Our requirement is to handle these such type of dialogue boxes which comes from MS Word from my application.


Thanks
Image.jpg
0
OTSSolutions
Asked:
OTSSolutions
  • 7
  • 7
1 Solution
 
ThommyCommented:
Try this to deactivate word dialogs and confirmations...

WordApplication.DisplayAlerts:=0;
0
 
ThommyCommented:
Also possible...

WordApplication.DisplayAlerts:=false;
0
 
OTSSolutionsAuthor Commented:
This is my code

WordApp.DisplayAlerts := wdAlertsNone;
WordApp.ScreenUpdating := False;
bConfConversions := False;
WPOpen( bMakeVisible );
WordApp.Documents.Open( sWPDoc, bConfConversions, bReadOnly, EmptyParam, EmptyParam,
        EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam   );
WordDoc.ConnectTo( WordApp.ActiveDocument );

But unable to skip those dialogue boxes.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
ThommyCommented:
The "Show Repairs" dialog only appears, if you are opening a damaged word doc.

Therefore it is no possible to prevent this dialog from appearing...

You cannot prevent the "Show Repairs" dialog box from appearing when you open a damaged document
http://support.microsoft.com/kb/903740

The only way to get rid of that dialog is to make sure that your word docs are accurate and do not need any repairs...
0
 
OTSSolutionsAuthor Commented:

Hi Expert,

I do agree with you but that was an example. The problem is to getting lots more dialogue boxes from Word application whether some of are with the damaged document and some of are coming while converting those document into other format.

I will upload if any such document will found.
Thanks
0
 
ThommyCommented:
Ok, please upload demo docs...
0
 
OTSSolutionsAuthor Commented:

I can not upload complete document here please take a look in image.

Thanks


Image2.jpg
0
 
OTSSolutionsAuthor Commented:

Mote Examples:
 Example 3 Example 4 Example 5
0
 
ThommyCommented:
Please tell me your MS Office version...
0
 
OTSSolutionsAuthor Commented:

MS Office 2007 & 2010.
0
 
OTSSolutionsAuthor Commented:
Hi,

I am still waiting for the solutions, Please...
0
 
ThommyCommented:
Please check this basic article for possible solutions...

How To Dismiss a Dialog Box Displayed by an Office Application with Visual Basic
http://support.microsoft.com/kb/259971
0
 
ThommyCommented:
What's the value of your variable bReadOnly???

bReadOnly should be true to avoid "File in Use" message (image3.jpg)...
0
 
OTSSolutionsAuthor Commented:
Hello Expert,

I am giving you complete points due to the solution is not possible in easy way. Your suggested article says like this.

Even if you use these techniques and carefully design your application to avoid dialog boxes, you may still be faced with a situation where a dialog box cannot be avoided with the methods and properties exposed in the Office application's object model. In such situations, it might be necessary to programmatically dismiss a dialog box by simulating user input. The following demonstration illustrates how this can be accomplished with a Visual Basic Automation client.


So finally, I don't think we have too much control on to dismiss such types of dialog box. I have to resolve this issue by programmatically.

Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now