Thought this might be helpful or interesting for anyone
trapping the Word dialog subs (as I do). The code below
executes at the start of each dialog sub (FileClose,
FileOpen, etc.) to test the state of the shift key. If it's down
when the dialog is invoked, the user gets to by-pass the
firm dialogs and use the built-in Word dialogs. Handy for
troubleshooting situations too.
Simple, but handy.
<pre>Const VK_SHIFT = &H10
Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Function UseWordMethod(strMsg As String) As String
If GetKeyState(VK_SHIFT) And &H8000 Then
ans = MsgBox(strMsg, vbYesNoCancel, "Use Word Dialog?")
Select Case ans
Case vbYes
UseWordMethod = "Yes"
Case vbNo
UseWordMethod = "No"
Case vbCancel
UseWordMethod = "Cancel"
End Select
Else
UseWordMethod = "No"
End If
End Function
</pre>



