Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2006
    Posts
    3

    Unable to get rid of the Outlook message while sending email

    Any idea how I can get rid of the following message while attempting to forward an automatic email? (under office 2000)



    "A program is trying to automatically
    send email on your behalf. Do you want to allow this?........"



    I want my functionnality to be transparent from the user. Moreover if the user select "NO", the program stops and re-direct the him in the debug mode.

    Any idea how I can get around this?

    merci!

  2. #2
    StepUP is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Dec 2005
    Posts
    99
    Don't know if you can get rid of the message. I use CDO for emailing from Access. Here is some sample code:

    '-----------------------------------------
    Public Sub SendCDO(f As Form, recip As String, subj As String, Body)

    ' Purpose Demonstrate Sending an Email with an attachment using CDO (Collaboration Data Objects)
    ' Uses Late Binding - Does not need a reference to the Microsoft CDO For Windows library
    ' cdosys comes innstalled as standard on Windows 2K and higher workstations and servers
    ' This code will fail on NT4, Win 98, and Win 95 where the cdosys.dll is not present
    ' Author Ron Weiner rweiner@WorksRite.com
    ' Copyrite © 2004-2005 WorksRite Software Solutions
    ' You may use this code example for any purpose what-so-ever with
    ' acknowledgement. However, you may not publish the code without
    ' the express, written permission of the author.

    Const cdoSendUsingPort = 2
    Const cdoBasic = 1
    Dim objCDOConfig As Object, objCDOMessage As Object
    Dim strSch As String, sBody As String, l As Integer

    strSch = "http://schemas.microsoft.com/cdo/configuration/"
    Set objCDOConfig = CreateObject("CDO.Configuration")
    With objCDOConfig.Fields
    .Item(strSch & "sendusing") = cdoSendUsingPort
    .Item(strSch & "smtpserver") = "mail.mysite.com"
    ' Only used if SMTP server requires Authentication
    .Item(strSch & "smtpauthenticate") = cdoBasic
    .Item(strSch & "sendusername") = "abc@mysite.com"
    .Item(strSch & "sendpassword") = "mypwd"
    .Update
    End With

    Set objCDOMessage = CreateObject("CDO.Message")
    With objCDOMessage
    Set .Configuration = objCDOConfig
    .From = "Me"
    .Sender = "me@mysite.com"
    .To = recip
    .Subject = subj
    ' Use TextBody to send Email in Plain Text Format
    '.TextBody = "This is a test for CDO message"
    ' Use HTMLBody to send Email in Rich Text (HTML) Format
    '.HTMLBody = "Test CDO Rich Text this is not Bold But This is!"
    ' Adding Attachments is easy enough
    '.AddAttachment "c:\Debug.log"
    '.AddAttachment "c:\MyPDFfile.pdf"
    ' Un-Rem next line to get "Return Reciept Request"
    '.MDNRequested = True
    .send
    End With

    Set objCDOMessage = Nothing
    Set objCDOConfig = Nothing

    End Sub

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

Similar Threads

  1. Reading outlook tasks from Access
    By Bill_dom in forum Import/Export Data
    Replies: 0
    Last Post: 08-07-2008, 06:02 PM
  2. Replies: 1
    Last Post: 01-04-2008, 11:40 AM
  3. SENDING EMAIL MESSAGES DIRECTLY FROM ACCESS
    By Frenchos in forum Access
    Replies: 0
    Last Post: 07-20-2007, 12:51 AM
  4. Sending email via Outlook (and Exchange2003) from Access2003
    By Larry Elfenbein in forum Programming
    Replies: 0
    Last Post: 11-15-2005, 09:03 PM
  5. Unable to import or link tables through odbc in Access SP2
    By Dave Jenkins in forum Import/Export Data
    Replies: 3
    Last Post: 11-09-2005, 11:51 AM

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