Is it possible to detect if a dialog box is open in Word?

R

Rob Stewart

Is there a way of detecting (programmatically) whether or not any dialog box
is open in Word (e.g. Find/Replace, Print etc)?

I need to know whenever the application is in a state that would NOT allow
me to access the selection object in the document - dialogs being open seems
to be the main cause of this. Hopefully there's a way to detect when they're
open.

Cheers,
Rob
 
P

Peter Huang

Hi Rob,

Based on my research, there is no method to judge if there is dialog open.
Can you tell us what is your going to do? In what scenario you wants to
access to the selection object when the modal dialog is open?
For find-search dialog, it is not a modal dialog, we can do the selection
operation when the dialog is open.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
R

Rob Stewart

Thanks Peter...I was just hoping there was a way of detecting it.

The Find/Replace example was just an example I picked, might not have been
quite appropriate. We have an automatic process that runs every 10 minutes,
and it needs to access the document. We're running into problems when the
user happens to have a dialog box open at the same time the auto process runs
(it runs in a separate thread).

You've answered my question....I'll take it from here. Will probably just
have to catch and process the errors as they occur.

Thanks,
Rob
 
P

Peter Huang

Hi Rob,

If you still have any concern on this issue, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top