Here is the code I am using NOW... BUT... when I hit the button... my PRINTER PRINTS!!!!
Code:
Private Sub Command29_Click()
On Error GoTo ErrorHandler
'open Outlook, attach zip folder or file, send e-mail
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
.BodyFormat = olFormatRichText
'.To = ""
''.cc = ""
''.bcc = ""
.Subject = Me.EmailSubjectField
.HTMLBody = Me.EmailMessageField
'.Attachments.Add ("path\filename")
''.DeleteAfterSubmit = True 'This would let Outlook send the note without storing it in your sent bin
End With
ExitHandler: 'clean up as necessary and exit
Set rs = Nothing 'These two lines are just an example
Set db = Nothing 'your code may not include them
Exit Sub
ErrorHandler:
Select Case Err 'specific Case statements for errors we can anticipate, the "Else" catches any others
Case 2501 'Action OpenReport was cancelled.
MsgBox "Email closed"
DoCmd.Hourglass False
Resume ExitHandler
Case Else
MsgBox Err.Description
DoCmd.Hourglass False
Resume ExitHandler
End Select
End Sub