**How to Sent HTML mail in outlook**

John M

Registered User.
Local time
Today, 22:56
Joined
Nov 20, 2001
Messages
69
Hi All,

Scenario:
Want to sent access report in HTML format in the body of the message and not as an attachment.
Basically, I want to create a form where I complete all the sending information and specify a HTML format, but instead of attaching it as file in the email, I want to be able to append it contents into the body of the message.

I have searched the access site and could not find an answer to this. I am able to send as an attachment. Could somebody help?? Thanks in advance.
 
Here's a bit of script I run from the macro's in Outlook, I don't know much about it really but it might point you in the right direction.

Sub Napolina()
Dim olApplication As Outlook.Application
Dim olns As Outlook.NameSpace
Dim myItem As Outlook.MailItem

Set olApplication = CreateObject("Outlook.Application")
Set olns = olApplication.GetNamespace("MAPI")
Set myItem = olApplication.CreateItem(olMailItem)
myItem.HTMLBody = "<HTML><BODY><P><H3>Sorry, this code wasn't a winner.</H3></P>" & _
"<P>But there are more codes to try on special packs of Napolina chopped tomatoes, pasta sauces or olive oil!</P>" & _
"<P>The Napolina Team</P>" & _
"<P>P.S. Take a look at <a href=""www.napolina.com"">www.napolina.com</a> for more ways to win!</P></BODY></HTML>"

myItem.Display
myItem.To = ""
'myItem.Send
End Sub
 
Yes, Crossmill. "HTMLBody" was the key, I can now send in HTML format.

Do you by any chance know I can somehow read the HTML contents of the HTML attachment and stick it into the mail using your technique above. - not easy!!!
 
Sorry, like I said, I don't really know much about it.
 
Sorry, like I said, I don't really know much about it.
 

Users who are viewing this thread

Back
Top Bottom