I am composing an email with Access VB and then sending it from within
Access.
Everything works correctly (the email actually goes!) but Outlook ask
some
irritating questions that the user is required to answer. A summary of
the
relevant code is:
Dim mailObj as Outlook.MailIte m
Set mailObj = OutlookObject.C reateItem(Outlo ok.olMailItem)
With mailObj
.Recipients.Add emailAddress
.Subject = "some heading"
.Body = aMessage
.Attachments.Ad d anInvoice
.Send
End With
The emailAddress in a string containing the email address stored in the
database but when the code reaches the .Recipients.Add statement,
Outlook
issues the message:
"A program is trying to access e-mail addresses you have stored in
Outlook.
Do you want to allow this?"
Well, I am not trying to access an address stored in Outlook. When the
use
clicks 'Yes', the same question is asked once more. Again the user must
click
'Yes'
When the code reaches the .Send statement, Outlook issues the following:
"A program is trying to automatically send e-mail on your behalf. Do
you
want to allow this?"
Outlook appears to be over cautious, assuming, or at least, suspecting a
virus.
How can I prevent these irritating messages appearing. The user simply
wants to press a button on a Form and have the appropriate email sent
automatically without having the answer 'Yes' three times.
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!