Underlining in VBA

Moonshine

Registered User.
Local time
Today, 23:07
Joined
Jan 29, 2003
Messages
125
Hi all

I have a piece of VBA code, that sends out an email with a couple of links on it to files on our network. The email explains what the two files are and then has the two links.

Above each link is a line saying something along the lines of:


Please Click Below To View The Finance Report:

\\Server\Filename.xls

Please Click Below To View The Summary Report:

\\Server\Report.rpt


Id like to underline the lines above the links, is this possible in VBA?
 
Moonshine said:
Hi all

I have a piece of VBA code, that sends out an email with a couple of links on it to files on our network. The email explains what the two files are and then has the two links.

Above each link is a line saying something along the lines of:


Please Click Below To View The Finance Report:

\\Server\Filename.xls

Please Click Below To View The Summary Report:

\\Server\Report.rpt


Id like to underline the lines above the links, is this possible in VBA?


coudnt you use HTML tags in the email? im just taking a stab in the dark here though! :)
 
Hrmm, sounds like a plan..

What are the tags?
 
For underlining in HTML, you use the following tags:

To open: <u>
To close: </u>

You will probably need your Outlook (or email application) to have HTML enabled on both ends.
 
Hrmm, im not sure on the HTML status of both email clients. I think our work defaults them all to plain text...

i'll test it and see :)
 
There's always the possibility - and I'm guessing as I've never coded with Outlook, might have a shot today - that you can treat it like a RichTextBox for text formatting. Might be worth doing a search on the RichTextBox as I can't remember the commands offhand.
 
Putting the HTML tags in doesnt seem to work. It just puts a piece of text in there with the tags :/

I thought i coulduse the more advanced sending emails code, with the OutLook.Application variable and setting. In the options there is an olHTML type, but im not sure if i can declare the type of email to be sent as HTML.
 
Done it! :)

With the above code, i used .HTMLBody instead of the normal .Body. Works like a dream!

Ta for the advice :)
 

Users who are viewing this thread

Back
Top Bottom