Results 1 to 9 of 9
  1. #1
    capitala is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    11

    disable security message upon sending an-email using outlook 2007

    my code is sending e-mail from access 2007 through outlook 2007
    I'm always getting this message: " A program is trying to access e-mail addresses

    giving my the choices "allow, deny, help"

    I've reduced the security and modified the trust centers and macro settings but useless.

    is there any way to avoid this message

    Thanks in advance

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Did you do from Outlook app menu > Tools > Trust Center > Programmatic Access
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    capitala is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    11
    actually this option is not active. (attached snapshot) Click image for larger version. 

Name:	image.jpg 
Views:	18 
Size:	91.5 KB 
ID:	11517

  4. #4
    capitala is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    11
    dear supermoderator: Ive activated the programmatic access and tickked on "never warn................"
    but still the same issue occurs

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Well, that works for me. I do not get the warning message.

    Show your code for sending email. What method are you using?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    capitala is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    11
    here's the code


    Private Sub cmdEmail_Click()


    Dim rs As ADODB.Recordset
    Set rs = New ADODB.Recordset
    Dim strsql As String
    Dim eSub, eText As Variant
    strsql = "Select [e-mail] from departments"
    eSub = Me!msgSubject
    rs.Open strsql, CurrentProject.Connection, adOpenKeyset, adLockReadOnly
    If rs.EOF And rs.BOF Then GoTo noEmail
    rs.MoveFirst
    Do While Not rs.EOF
    Dim emailaddredss
    emailaddress = DLookup("email", "departments", "department= dept ")
    report_name = "all_course_details_departments_summary"
    DoCmd.SendObject acSendReport, report_name, acFormatPDF, emailaddress, , , eSub, eText, False
    DoCmd.SendObject , , , rs![e-mail], , , eSub, eText, False
    rs.MoveNext
    Loop
    rs.Close
    Set rs = Nothing
    Exit Sub
    noEmail:
    rs.Close
    Set rs = Nothing
    MsgBox "The EmailTable does not have any names to email. Enter names and email addresses in this table first."




    End Sub

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    SendObject isn't what I use but I just tested it and an email document window opened with the pdf attached. No warning message. I just had to click SEND and the email was sent.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    JrMontgom is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    Sep 2012
    Location
    Vero Beach, FL USA
    Posts
    124

    Red face Outlook Email from MS Access

    Quote Originally Posted by June7 View Post
    SendObject isn't what I use but I just tested it and an email document window opened with the pdf attached. No warning message. I just had to click SEND and the email was sent.
    I am using MSaccess 2010 and I got rid of the warning message but you can't "Send" and email without pressing the OutLook "Send" button. I believe this is part of the Security on OutLook so there is no way to send "automatic" emails without the users OK. I don't know if the CDO mail would do the same, I'll have to check.

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    There is code to automatically send email but doesn't involve SendObject method.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. sending data into an email body - outlook
    By webisti in forum Access
    Replies: 6
    Last Post: 02-15-2012, 07:05 AM
  2. bypass the Outlook security message
    By ybg1 in forum Programming
    Replies: 7
    Last Post: 12-21-2011, 10:28 AM
  3. Replies: 3
    Last Post: 09-01-2010, 08:43 PM
  4. Replies: 1
    Last Post: 03-09-2006, 01:50 PM
  5. Sending email via Outlook (and Exchange2003) from Access2003
    By Larry Elfenbein in forum Programming
    Replies: 0
    Last Post: 11-15-2005, 09:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums