Загрузка страницы

Excel VBA Macro: Send Email with Hyperlink (that has Spaces in the File Name)

Excel VBA Macro: Send Email with Hyperlink (that has Spaces in the File Name). In this video, we go over how to ensure that a hyperlink with spaces in the filename does not get cut off after the first space.

Code (YouTube doesn't allow brackets; so LT and GT are used for less than and greater than, respectively):

Sub send_hyperlink_with_spaces()

Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim link As String

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

link = Replace(ThisWorkbook.Sheets("Sheet1").Cells(1, 1).Text, " ", "%20")
MsgBox link

strbody = "LT BODY style = font-size:14pt; font-family:Arial GT" & _
"Hello Team, LT p GT Please see the link for today: " & _
"LT a href= " & link & "GT here LT / GT LTp GT" & _
"Best regards, LT br GT Greg"

On Error Resume Next
With OutMail
.to = "abc@123.com"
.CC = "me@me.com"
.BBC = ""
.Subject = "Morning Link " & Format(Date, "mm-dd-yyyy")
.display
.HTMLBody = strbody & .HTMLBody

End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing

End Sub

#ExcelVBA #ExcelMacro

Видео Excel VBA Macro: Send Email with Hyperlink (that has Spaces in the File Name) канала greggowaffles
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
2 октября 2022 г. 7:29:20
00:08:51
Другие видео канала
Excel VBA Macro: Open Newest Files (from Multiple Folders) and Save Them in Another FolderExcel VBA Macro: Open Newest Files (from Multiple Folders) and Save Them in Another FolderComment Out Blocks of Code 🤓 #excelmacro #excelvba #msexcelComment Out Blocks of Code 🤓 #excelmacro #excelvba #msexcelExcel VBA Macro: Delete All Sheets that Contain a Certain Text (String) ValueExcel VBA Macro: Delete All Sheets that Contain a Certain Text (String) ValueExcel VBA Macro: Resize Range (Table) Pasted As Image In Email BodyExcel VBA Macro: Resize Range (Table) Pasted As Image In Email BodyExcel VBA Macro: Count and List the Number of (Conditonally Formatted) Cells at the End of Each RowExcel VBA Macro: Count and List the Number of (Conditonally Formatted) Cells at the End of Each RowExcel VBA Macro: Save File As Previous Work/Business Day (Excluding Holidays)Excel VBA Macro: Save File As Previous Work/Business Day (Excluding Holidays)Excel VBA Macro: Right Align Image in Email Body (and Resize)Excel VBA Macro: Right Align Image in Email Body (and Resize)Excel VBA Macro: List Time Last Saved (For All Files In Folder)Excel VBA Macro: List Time Last Saved (For All Files In Folder)Excel VBA Macro: Delete Rows If Any Cell in Those Rows (Across All Columns) Contains a Certain ValueExcel VBA Macro: Delete Rows If Any Cell in Those Rows (Across All Columns) Contains a Certain ValueExcel VBA Macro: Autofilter And Copy/Paste To Multiple Sheets (Dynamic Range)Excel VBA Macro: Autofilter And Copy/Paste To Multiple Sheets (Dynamic Range)Excel VBA Macro: Resize Large Table Ranges After Pasting (As Image) In Email BodyExcel VBA Macro: Resize Large Table Ranges After Pasting (As Image) In Email BodyExcel VBA Macro: Export Selected Range as Image (Save Range as Picture)Excel VBA Macro: Export Selected Range as Image (Save Range as Picture)Excel VBA Macro: Send Email with Attachments from a List (Dynamic Range)Excel VBA Macro: Send Email with Attachments from a List (Dynamic Range)Excel VBA Macro: Remove Special Characters (in List of Strings) & Post New Strings Next to Old OnesExcel VBA Macro: Remove Special Characters (in List of Strings) & Post New Strings Next to Old OnesExcel VBA Macro: Capitalize First Letter of Every Word in a (Static/Dynamic) Range of StringsExcel VBA Macro: Capitalize First Letter of Every Word in a (Static/Dynamic) Range of StringsExcel VBA Macro: Find Sheet in Another (User Selected) Workbook and Copy Data OverExcel VBA Macro: Find Sheet in Another (User Selected) Workbook and Copy Data OverExcel VBA Macro: Create Word Document & Add Table (Static Range)Excel VBA Macro: Create Word Document & Add Table (Static Range)Excel VBA Macro: List All Sheet/Tab Names (From Another User Selected Workbook)Excel VBA Macro: List All Sheet/Tab Names (From Another User Selected Workbook)Excel VBA Macro: Add New Sheets To Beginning Or End of Workbook (With Names)Excel VBA Macro: Add New Sheets To Beginning Or End of Workbook (With Names)Excel VBA Macro: Save Selected Range as PDF (and Center on Page)Excel VBA Macro: Save Selected Range as PDF (and Center on Page)
Яндекс.Метрика