Hi all,
hopefully someone can point me in the right direction! How do you include a variable in the HTML body for an email generated via macro? I have the current selection of cells stored in a variable SelRange, my code looks like:
I've tried a few combinations but I only dabble with VBA so im not sure where Im going with this problem.![]()
Dim OutApp As Object Dim OutMail As Object Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .To = EmailTo .SentOnBehalfOfName = """NAME"" <(EMAIL)>" .Subject = Subj .BodyFormat = olFormatHTML .htmlbody = "Hi, <p>The following items are showing as in transit:<p> & SelRange & <p> Please advise<p> Regards<p>" .display End With
Second request, does anyone know how to include the outlook default signature to the email when using HTML body? This seems to delete it as apposed to using plain text email.
Thanks in advance!
Bookmarks