Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sending Mail From Access (2003)

    Is there a way to click the Yes button via code in the warning message (see picture)
    that pops up in response to a Send command?
    <pre>Private Sub Sospeso_AfterUpdate()
    Dim olApp As Outlook.Application
    Dim olNS As Outlook.Namespace
    Dim olFolder As Outlook.MAPIFolder
    Dim olMailItem As Outlook.MailItem
    Dim strBodyText As String
    If Sospeso = True Then
    If Me!SentFlag = False Then
    Set olApp = CreateObject("Outlook.Application")
    Set olNS = olApp.GetNamespace("MAPI")
    Set olFolder = olNS.GetDefaultFolder(OlFolderInbox)
    Set olMailItem = olFolder.Items.Add("IPM.Note")
    strBodyText = "In merito alla Vs richiesta del" & vbCrLf & _
    Me.Giorno & vbCrLf & _
    "Utente: " & Me.Rich & vbCrLf & _
    "di: " & Me.UnMis & " " & Me.Quantity & " " & Me.Description & _
    "." & vbCrLf & _
    "Desidererei conoscere ulteriori dettagli." & vbCrLf & _
    "Attendo Vs chiamata."
    With olMailItem
    .Subject = "Richiesta Materiale"
    .To = Me.email
    .Body = strBodyText
    .Importance = olIMportanceHigh
    <span style="background-color: #FFFF00; color: #000000; font-weight: bold"> .Send</span hi>
    End With
    Set olMailItem = Nothing
    Set olFolder = Nothing
    Set olNS = Nothing
    Set olApp = Nothing
    Me!SentFlag = True
    Else: Exit Sub
    End If
    Else
    Exit Sub
    End If
    End Sub</pre>

    Attached Images Attached Images

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sending Mail From Access (2003)

    See <post:=488,173>post 488,173</post:>.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending Mail From Access (2003)

    Thank you Hans, I think I'll go with either of the first two options. If I were to install the Outlook Redemption(I suppose one needs Admin privileges to do that), would the code you see in my post need to be modified or stay the same?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sending Mail From Access (2003)

    You'd have to rewrite it extensively - see the documentation on the Outlook Redemption website.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sending Mail From Access (2003)

    Gary Rezek posted a useful example of using Outlook Redemption - see <post:=700,945>post 700,945</post:>.

Posting Permissions

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