Michael 514
03-05-2005, 10:42 AM
Hello all,
As many of you have seen from the my other threads here, I am dealing with some VBA code in Excel that opens up a bunch of Word documents and populates various cells with the bookmarks from the Word document.
Things are going nicely, but there is one small issue I would love to avoid:
If the user selects a Word Document that is open (either on her PC or on another PC), the Excel VBA macro appears to hang.
Believe it or not, a trip to the Task Manager is required!
Upon closer examination, I noticed that the macro isn't handing. Rather, the user is simply presented with a dialog box telling the User the document is open, and to "open a read only copy, etc. etc."
The problem is that this dialog box is hidden under the Excel window! It doesn't come into focus.
I am not 100% sure if this is due to behavior on all machines, so just the fact that the user may have used Microsoft's Power Tools' TweakUI to "Prevent Applications from Stealing Focus."
In any case, I was wondering if it's possible to FORCE a dialog box to come into control, or alternatively, for an Excel VBA Macro that is accessing a Word document to 'know' if the Doc is open or not, and if so, to either prompt the user to close it, or, alternatively, to automatically open a "read-only" copy.
This isn't a tremendously mission-critical request, but it would just be a nice feature to add to this cool macro we all created before we stick it in the KB.
Ideas are welcome!
Thanks!
Mike
As many of you have seen from the my other threads here, I am dealing with some VBA code in Excel that opens up a bunch of Word documents and populates various cells with the bookmarks from the Word document.
Things are going nicely, but there is one small issue I would love to avoid:
If the user selects a Word Document that is open (either on her PC or on another PC), the Excel VBA macro appears to hang.
Believe it or not, a trip to the Task Manager is required!
Upon closer examination, I noticed that the macro isn't handing. Rather, the user is simply presented with a dialog box telling the User the document is open, and to "open a read only copy, etc. etc."
The problem is that this dialog box is hidden under the Excel window! It doesn't come into focus.
I am not 100% sure if this is due to behavior on all machines, so just the fact that the user may have used Microsoft's Power Tools' TweakUI to "Prevent Applications from Stealing Focus."
In any case, I was wondering if it's possible to FORCE a dialog box to come into control, or alternatively, for an Excel VBA Macro that is accessing a Word document to 'know' if the Doc is open or not, and if so, to either prompt the user to close it, or, alternatively, to automatically open a "read-only" copy.
This isn't a tremendously mission-critical request, but it would just be a nice feature to add to this cool macro we all created before we stick it in the KB.
Ideas are welcome!
Thanks!
Mike