Excel VBA Macro: Right Align Image in Email Body (and Resize)

Excel VBA Macro: Right Align Image in Email Body (and Resize)
💥Subscribe: / @greggowaffles
Code: KZread doesn't allow angled brackets in the description, so the code will instead be placed in the comment section for reference.
#excelmacro #excelvba

Пікірлер: 3

  • @greggowaffles
    @greggowaffles Жыл бұрын

    Code: Sub align_image_2_right_in_email() Dim OutApp As Object Dim OutMail As Object Dim strbody1 As String Dim strbody2 As String Dim png As String Dim align As String Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) png = ThisWorkbook.Sheets("Sheet2").Cells(9, 2).Text align = "text-align: right;" strbody1 = "" & _ "Hello Everyone,Please see image below." strbody2 = "Thank you,Greg" On Error Resume Next With OutMail .to = "abc@123.com" .CC = "" .BCC = "" .Subject = "Today's Image " & Format(Date, "mm-dd-yyyy") '.Send .Display .HTMLBody = strbody1 & "

  • @CollDott
    @CollDott Жыл бұрын

    👏👍

  • @riccasalimbao8577
    @riccasalimbao8577 Жыл бұрын

    What if instead of the attachment it’s the text merge into a table

Келесі