Hi,
When I receive certain emails they appear as a webpage i.e HTML formatted text and graphics images etc. How do I send emails the same?
Printable View
Hi,
When I receive certain emails they appear as a webpage i.e HTML formatted text and graphics images etc. How do I send emails the same?
I am awake now. :D
If you mean manually then if your using Outlook you can change your settings in the Options > Mail Format > Message Format > "Compose in this message format:" > and choose HTML.
If you mean programmatically I can post the code too but I think you may mean manually.
I have changed the settings to be html but where do I place the html code?
If I type it directly into the message body it doesnt display as rendered html when received by a recipient its still just code!
What I am trying to do is send emails that appear as webpages.
For that ot happen the receipient must be able to view their emails as HTML too. When you type into the body it will be like using FrontPage or any WYSIWYG editor.
I have some code on the forums for this let me search for it.
Couldnt find it. What version of Outlook are you using? I will write up something quickly.
Meanwhile this is a link for Outlook 2000 and before.
http://msdn.microsoft.com/library/de...roHTMLBody.asp
Hi Rob,
I think its just me being stupid but if I set the message to be of type HTML
and in the message paste
<HTML>
<BODY BGCOLOR="RED">
<B>HTML EMAIL</B>
</BODY>
</HTML>
should it not display as a html page, (I guess not because I tried it) but thats what Im wanting to do, design an email that displays like a wepage in outlook through code.
PS Im using Outlook express which I got free with XP, but I know its capable of displaying these emails because thats how most spam I receive is displayed.
Here is a quick and dirty demo.
VB Code:
Option Explicit 'Add a reference to MS Outlook xx.0 Object Library Private moApp As Outlook.Application Private Sub Command1_Click() Dim oEmail As Outlook.MailItem Dim strBody As String Set oEmail = moApp.CreateItem(olMailItem) strBody = "<HTML><HEADER><TITLE>RobDog888 HTML Email DEMO</TITLE></HEAD>" strBody = strBody & "<BODY bgcolor='green'>Testing</BODY></HTML>" With oEmail .BodyFormat = olFormatHTML .HTMLBody = strBody .Subject = "RobDog888 HTML DEMO" .Save 'Saves it to the Drafts folder .Display End With End Sub Private Sub Form_Load() Set moApp = New Outlook.Application End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) moApp.Quit Set moApp = Nothing End Sub
Thanks I see what is happening there in vb code, but is there no way to just type HTML direct into an email through Outloook?
I suppose you could change your options. Option > Mail Format > Use Word to edit emails, but thats still a WYSIWYG editor.