![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I'm using Access to automate mailing in Outlook, and I have the message
working and can control some of the attributes--font name, bold, and italic--but I'm having trouble with font size. I'm using the following code with the MailItem. If I leave it out, the message body defaults to font size 12. If I put it in, regardless of the size I specify, the message body changes to font size 36. oMsg.HTMLBody = "HTMLBODYFONT SIZE=" & """12""" & "" & "Test" & "/BODY/HTML" It evaluates as HTMLBODYFONT SIZE="12"Test/BODY/HTML, which works fine on a web page but won't work in my Outlook message. I also can't figure out how to get the color specified by the user of the application. I capture the font attributes they specify for a text box containing the message in one module in a table, then use them to construct the HTML, but the color numbers in the Access text box don't seem to match the colors required by HTML. Is there a translation table somewhere? Would appreciate any help I can get. This is my first time trying to format Outlook messages. |
#2
|
|||
|
|||
![]()
Try 3 instead of 12 or (recommended) use inline styles. See http://www.w3schools.com/tags/tag_font.asp
For color, you have to convert RGB to Hex values; see http://www.wurd.com/pwp_color.php -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Judy" wrote in message oups.com... I'm using Access to automate mailing in Outlook, and I have the message working and can control some of the attributes--font name, bold, and italic--but I'm having trouble with font size. I'm using the following code with the MailItem. If I leave it out, the message body defaults to font size 12. If I put it in, regardless of the size I specify, the message body changes to font size 36. oMsg.HTMLBody = "HTMLBODYFONT SIZE=" & """12""" & "" & "Test" & "/BODY/HTML" It evaluates as HTMLBODYFONT SIZE="12"Test/BODY/HTML, which works fine on a web page but won't work in my Outlook message. I also can't figure out how to get the color specified by the user of the application. I capture the font attributes they specify for a text box containing the message in one module in a table, then use them to construct the HTML, but the color numbers in the Access text box don't seem to match the colors required by HTML. Is there a translation table somewhere? Would appreciate any help I can get. This is my first time trying to format Outlook messages. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating a new mailItem with a signature, and a modified HTMLBody | Peter Reinhold | Add-ins for Outlook | 6 | November 10th 06 04:52 PM |
MailItem.UserProperties property itself does not exist? (0x8004010F error) | Jeff | Outlook and VBA | 2 | October 17th 06 02:58 PM |
MailItem To property and display name | Olivier Langlois | Outlook and VBA | 1 | September 11th 06 06:10 PM |
Outlook 2003 vs. 2000 / HTMLBody Property | Fred Block | Outlook and VBA | 5 | August 7th 06 08:04 PM |
Set MailItem.Sender Property | Joshua Ellul | Add-ins for Outlook | 2 | June 8th 06 07:30 PM |