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>




