Help with message format

daverunt

Well-known Member
Joined
Jul 9, 2009
Messages
1,946
Office Version
  1. 2013
Platform
  1. Windows
Hi,

I want to be able to create a message body for email on a worksheet, which includes hyperlinks.

What would be the best method?


I'm currently using a Textbox on my Excel sheet to create the body of an email message - example below.
I use the 'shapes' object code below to get the text.

There are a couple of problems with this.
Can't drop it into an .HTMLBody mail - no tags it just becomes one line of garbage
Can't seem to read each line and format it to HTML dynamically

I have tried just a merged set of rows and would rather try for something better.

Any ideas gratefully accepted/investigated.


Msg example:

Hi xxxxr,

If not already updated you must update to framework build 10v0.

Framework
https://www.dropbox.com/s/kaz6n0uycwb4j4d/10v0.msi?dl=0

Documents
https://www.dropbox.com/s/drhyshjui0xs5zn/Supporting_Docs_10v0.zip?dl=0

Best Regards

Code:
MailBody = Sheets("Messages").Shapes("Box 1").OLEFormat.Object.Text
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Thanks but this doesn't give working hyperlinks in a mail.
 
Upvote 0
To get the hyperlinks to copy into the mail body as working links, I have reverted to concatenating a few cells for the message content instead of a TextBox.
As long as Outlook default is HTML format mails the hyperlinks in the mail work.

It'll have to do.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top