sending email to outlook from vb6 program - warning messages in outlook
I am developing a vb6 application that uses outlook to send an email from within the vb6 program. The message is sent but only after outlook displays 2 warning messages about "A program is trying to access e-mail addresses you have stored in outlook" and "A program is trying to automatically send email on your behalf".
I do not want the error messages to pop up. See the attached file for screen snapshot of the warning messages. Also, I have checked the Microsoft Outlook 11.0 Object Library.
Thanks for any help on how I can eliminate the messages.
Private Sub mnuEmailTest_Click()Dim oApp As Object 'OutlookDim oNewMail As ObjectSet oApp = New Outlook.ApplicationSet oNewMail = oApp.CreateItem(olMailItem)With oNewMail .Display .Recipients.Add "firstname.lastname@example.org" .Subject = "Subject here" .Body = "Text here" .Attachments.Add "c:\mypdf.pdf" .SendEnd WithSet oNewMail = NothingSet oApp = NothingEnd Sub