Hi, all
I cannot figure out how to name my hyperlinks in my current code. I belive I need to change the .body to html to allow for this. Any help would be great.
]
]
I cannot figure out how to name my hyperlinks in my current code. I belive I need to change the .body to html to allow for this. Any help would be great.
]
VBA Code:
Sub emailPDF ()
ThisWorkbook.Sheets(Array("Cover Sheet", "XXX Names", "XXX Names 1")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"x:\xx\xxx\CHI XX\Test\CHI XXX " & Format(Date, "mmddyyyy") & ".pdf", Quality:=xlQualityStandard _
, IncludeDocProperties:=False, IgnorePrintAreas:=False, OpenAfterPublish _
:=False
' Prepare e-mail
Dim OutLookApp As Object
Dim OutLookMailItem As Object
Dim myAttachments As Object
Set OutLookApp = CreateObject("Outlook.application")
Set OutLookMailItem = OutLookApp.CreateItem(0)
Set myAttachments = OutLookMailItem.Attachments
With OutLookMailItem
.To = "[EMAIL]XXX@yahoo.com[/EMAIL]"
.Subject = "Test"
.Body = "ALCON," & vbCr & vbCr & "Please see the attached xxx Report for " & Format(Date, "dddd, mmmm dd, yyyy.") _
& vbCr & vbCr & "https://fics.ishare.xxx/Fieldxxx/CHI/xxx/xxx/DATA/xxx/xxx_Schedule/Chicago%20Management%20xxx-2022.xlsm?web=1"
myAttachments.Add "x:\xxx\xxx\xxx\Test\CHI xxx " & Format(Date, "mmddyyyy") & ".pdf"
.display
End With
Set OutLookMailItem = Nothing
Set OutLookApp = Nothing
End Sub