Apparently that is a security feature is NOT suppose to be avoided.
You can write a script that mimmicks a user's response to dismiss that dialogue. Here is the script that will do it:
'------------------------------------
'DismissDialogue.VBS
On Error Resume Next
Set WshShell = Wscript.CreateObject("WScript.Shell")
Do
Loop Until WshShell.AppActivate("Microsoft Office Outlook")
Wscript.Sleep WScript.Arguments(0)
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"
'------------------------------------------
Save the script in a .vbs file. For testing you could have it in the root of you app.
Now within the app just before the .Send() start the script like this:
lcCommandString = "'DismissDialogue.vbs " + Chr(34) + Transform(10) + Chr(34)
oWshShell = CreateObject("WScript.Shell")
oWshShell.Run(lcCommandString)
oWshShell = Null
Scripting is also subject to it's own security concerns.
>I am using activex msmapi32.ocx do send email. When my VFP program is trying to send email using outlook the following message appears "A program is trying to automatically send an email in your name? Do you allow this?"
>
>How to avoid this message?
Mathias Banda
Time is longer than a rope.