I needed to create an email which looks like a web page. So this is what this example lets you do.
Very simple, based on ramani's example.
Create a form with a command button.
On the click event of the command button, place the following code.
o=createobject("outlook.application")
oitem=o.createitem(0)
oitem.subject="Email From VFP6"
oitem.to="flash@whereever.co.uk"
oitem.htmlbody="<HTML><H2>My HTML page.</H2><BODY>My body.</BODY></HTML>"
oitem.send
o=.null.
Therefore, the htmlbody is what you set to contain your HTML code.
One thing to note:
If you set the oitem.body, it will wipe the oitem.htmlbody
Rate it and I may get my first vote!
![[surprise] [surprise] [surprise]](/data/assets/smilies/surprise.gif)