
Originally Posted by
TheShabz
nix using sendObject. save the form as a pdf and the try this out. hasn't failed me yet. you should be able to figure out what to change.
private sub sendOutlookEmail()
'**create variables for Outlook
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
'***creates an instance of Outlook
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
'***creates and sends email
With objEmail
.To = me.txtEmailAddress
.subject = "Whatever you want" or form object
.body = "whatever you want" or form object
.attachments.add "path to file"
.send 'sends the email in Outlook. Change to DISPLAY if you want to be able to
'modify or see what you have created before sending the email
End With
'**closes outlook
Set objEmail = Nothing
End sub