Access VBA attach via Outlook Add-In (Hightail)

orangeregalbegal

New member
Local time
Yesterday, 21:45
Joined
Sep 21, 2011
Messages
3
Hello,
I want to write code that sends an attachment via an Outlook add-in called Hightail. I have no clue how to reference add-ins in VBA. I have MS Access 2013 and Outlook 2013.
Thank you for your help

Public Sub doEmailOutlook(sTo As String, sCC As String, sSubject As String, sBody As String, sFile As String, Optional sFile2 As String)
'On Error GoTo doEmailOutlookErr

Dim strEmail As String
Dim strMsg As String
Dim oLook As Object
Dim oMail As Object

Set oLook = CreateObject("Outlook.Application")
Set oMail = oLook.createitem(0)
With oMail
.ReplyRecipients.Add "
.to = sTo
.cc = sCC
.body = sBody
.htmlbody = sBody
.Subject = sSubject
If sFile <> "" Then
.Attachments.Add (sFile)
If sFile2 <> "" Then
.Attachments.Add (sFile2)
End If
End If

If bPreview = True Then
.display
Else
.Send
End If
End With
'signature = oMail.body
If bPreview = False Then
Set oMail = Nothing
Set oLook = Nothing
End If
Exit Sub
End Sub
 

Attachments

  • Higtail.JPG
    Higtail.JPG
    49.2 KB · Views: 84

Users who are viewing this thread

Back
Top Bottom