R
Richard
I hope this is the right newsgroup, if not please point me in the right
direction.
Could anyone tell me why Dialogs(wdDialogEditReplace).Show works but
MsgBox Dialogs(wdDialogEditReplace).Show doesn't (raising error 5524, which
as far as I can gather is undocumented)?
Which leads me to the $xxxx dollar question: is there any way to
programatically retrieve the return value of .Show? (i.e. the button/action
the user performed)
All the code I've seen puts an On Error Resume Next before the .Show line,
which would suggest that the answer to above is 'No'!
Alternatively, is there a Win API workaround (possibly with callback
function) that calls Word's F&R dialog?
Before you ask, I've already tried all the very erratic Sendkeys ways of
calling Word's F&R dialog. Sendkeys with Ctrl-H from a Public Sub itself
called by a keybinding does not work, (Sendkeys Alt-e, e from same Public
Sub does, but some of my users have already remapped Alt-e for their own
purposes). I know I can .Execute my Selection.Find etc, but I really need to
be able to "intercept" it via the dialog. If there's no way of
programmatically "hooking in" to Word's F&R dialog, then I suppose the only
viable alternative is to create one's own dialog with a UserForm (kludgy and
slower at best, no?)?
Regards
Richard
direction.
Could anyone tell me why Dialogs(wdDialogEditReplace).Show works but
MsgBox Dialogs(wdDialogEditReplace).Show doesn't (raising error 5524, which
as far as I can gather is undocumented)?
Which leads me to the $xxxx dollar question: is there any way to
programatically retrieve the return value of .Show? (i.e. the button/action
the user performed)
All the code I've seen puts an On Error Resume Next before the .Show line,
which would suggest that the answer to above is 'No'!
Alternatively, is there a Win API workaround (possibly with callback
function) that calls Word's F&R dialog?
Before you ask, I've already tried all the very erratic Sendkeys ways of
calling Word's F&R dialog. Sendkeys with Ctrl-H from a Public Sub itself
called by a keybinding does not work, (Sendkeys Alt-e, e from same Public
Sub does, but some of my users have already remapped Alt-e for their own
purposes). I know I can .Execute my Selection.Find etc, but I really need to
be able to "intercept" it via the dialog. If there's no way of
programmatically "hooking in" to Word's F&R dialog, then I suppose the only
viable alternative is to create one's own dialog with a UserForm (kludgy and
slower at best, no?)?
Regards
Richard