Hello everyone,
I'm creating a custom command button in my excel spreadsheet to open a new mail message window with recipients and a body of text.
I have a couple of questions though. Could you help me answer them? I've been searching tirelessly on the internet and can't seem to find an answer
1. Instead of an attachment action line, e.g. .Attachments.Add ActiveWorkbook.FullName,(which only attaches the document to your e-mail) can I attach a hyperlink of the actual current document? I assume it'd have to be saved on the harddrive obviously.
2. I noticed when I click on my command button, the e-mail is in plain text. Is there a way I can change the font and size of the text in the body of the e-mail?
Here is the code I am currently using:
Thank you everyone for taking the time to read this post.Sub BranchRequest() Dim OutApp As Object Dim OutMail As Object Dim strbody As String Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) strbody = "Please see the documents below regarding the special inventory for the [issue name]” & vbNewLine & _ & vbNewLine & _ [Insert Special Inventory Hyper-Link] & vbNewLine & _ & vbNewLine & _ “Thank you,” On Error Resume Next With OutMail .To = Range ("K3") .CC = Range ("K4") .BCC = "" .Subject = "Special Inventory for [issue name]" .Body = strbody .Display End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End Sub
I've learned a lot reading through many of the posted discussions (but I haven't figured this out yet ;p )
Bookmarks