• surpress Outlook security warnings

    Author
    Topic
    #461827

    I run a MS Access 2003 application that sends email via MS Outlook. Each message is created with the sub procedure below. Each time I run the application, I get prompted with MS Outlook security warnings as follows:
    “A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this?
    If this is unexpected, it may be a virus and you should choose “No”.
    [ ] Allow acess for [x minutes]
    Yes No Help”

    and then another:
    “A program is trying to access e-mail addresses you have stored in Outlook. If this is unexpected, click Deny and verify your antivirus software is up-to-date.”

    How do I turn off these warnings?

    Thanks,

    ‘===============================================================
    Sub SendEmail(ByVal strEmailAddr As String, DisplayMsg As Boolean, Optional AttachmentPath)
    On Error Resume Next

    Dim strMessage As String
    Dim i As Integer

    strMessage = “the message body goes here…..”

    Dim objOutlook As Outlook.Application
    Dim objOutlookMsg As Outlook.MailItem
    Dim objOutlookRecip As Outlook.Recipient
    Dim objOutlookAttach As Outlook.Attachment

    ‘ Create the Outlook session.
    Set objOutlook = CreateObject(“Outlook.Application”)

    ‘ Create the message.
    Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

    With objOutlookMsg
    ‘ Add the To recipient(s) to the message.
    Set objOutlookRecip = .Recipients.Add(strEmailAddr)
    objOutlookRecip.Type = olTo

    ‘ Add the CC recipient(s) to the message.
    ‘Set objOutlookRecip = .Recipients.Add(“someaddress@somedomain.com”)
    ‘objOutlookRecip.Type = olCC

    ‘ Add the BCC recipient(s) to the message.
    ‘Set objOutlookRecip = .Recipients.Add(“Joe Blow”)
    ‘objOutlookRecip.Type = olBCC

    ‘ Set the Subject, Body, and Importance of the message.
    .Subject = “some subject goes here…”
    .Body = strMessage & vbCrLf & vbCrLf
    .Importance = olImportanceNormal

    ‘ Add attachments to the message.
    If Not IsMissing(AttachmentPath) Then

    For i = 0 To UBound(varAttachments)

    Set objOutlookAttach = .Attachments.Add(varAttachments(i))

    Next i

    End If

    ‘Resolve each Recipient’s name.
    For Each objOutlookRecip In .Recipients
    objOutlookRecip.Resolve
    Next

    ‘ Should we display the message before sending?
    If DisplayMsg Then
    .Display
    Else
    .Save
    .Send
    End If
    End With
    Set objOutlook = Nothing

    End Sub

    ‘===============================================================

    Viewing 1 reply thread
    Author
    Replies
    • #1173250

      More knowledgeable loungers than I will chip in soon I’m sure (and correct me if I am wrong). AFAIK, this is not possible. I asked this question also, some time ago, (excel related).

    • #1173262

      See [post=”488173″]Post 488173[/post] for workarounds.

      • #1173380

        See [post=”488173″]Post 488173[/post] for workarounds.

        FWIW, I’ve used Redemption with great results and the support for it is also great.

        Kim

        • #1173393

          FWIW, I’ve used Redemption with great results and the support for it is also great.

          You have to invest a bit of time to learn how to use it, but then it works very well indeed.

          • #1173398

            You have to invest a bit of time to learn how to use it, but then it works very well indeed.

            Thanks all. We’re temporarily using the “CheckYes” option. This works for now until we get either SQL Server Reporting Services figured out or SQL Database Mail scripted.

            —aap2—

    Viewing 1 reply thread
    Reply To: surpress Outlook security warnings

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: