Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Virginia, USA
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

    '================================================= ==============

  2. #2
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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).

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    See Post 488173 for workarounds.

  4. #4
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts
    [quote name='HansV' post='788683' date='12-Aug-2009 11:43']See Post 488173 for workarounds.[/quote]

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

    Kim

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='kmurdock' post='788828' date='13-Aug-2009 19:09']FWIW, I've used Redemption with great results and the support for it is also great.[/quote]
    You have to invest a bit of time to learn how to use it, but then it works very well indeed.

  6. #6
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Virginia, USA
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='788847' date='13-Aug-2009 20:12']You have to invest a bit of time to learn how to use it, but then it works very well indeed.[/quote]


    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---

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •