How to set background image for ActiveInspector.CurrentItem?

B

Burma Jones

Assuming an HTML-formatted message, how does one set the background image programmatically? Just like when you go Format -> Background -> Picture, and then browsing to the image. Don't want to use Sendkeys if at all possible. Thanks!
 
M

Michael Bauer

Am Wed, 15 Feb 2006 15:51:44 -0800 schrieb Burma Jones:

In general this works:

Public Sub SetBackgroundImage()
Dim oMail As Outlook.MailItem
Dim sText As String

Set oMail = Application.CreateItem(olMailItem)
sText = "<body style='background-image:url(picture.jpg)'>"
sText = sText & "hallo"
oMail.HTMLBody = sText
oMail.Display
End Sub


--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --

Assuming an HTML-formatted message, how does one set the background image
programmatically? Just like when you go Format -> Background -> Picture,
and then browsing to the image. Don't want to use Sendkeys if at all
possible. Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top