Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending HTML mail messages
Message
From
13/10/2003 07:55:37
 
 
To
13/10/2003 06:58:06
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00838026
Message ID:
00838035
Views:
25
>Hi,
>
>I got this sample code from message #611182:
>
>oOutlookApp = createobject('outlook.application')
>oMailItem = oOutlookApp.createitem(0)
>
>with oMailItem
>	.HTMLBody = "Here comes the HTML code"
>	.subject = "Here comes the subject"
>	.to = "myemail@myorg.com.br"
>	.send()
>endwith
>
>When I try to run it I get an "OLE error code 0x80020006: unknown name" error in the line containing the ".HTMLBody = "Here comes the HTML code"". If I comment that line it works ok.
>
>What am I missing?
>
>TIA
>
>Fernando

Fernando, this example works for me as is using Outlook 2002 SP2 on Winxp. What version of outlook are you running? Have you got intellisense on - use it and enter the above commands in the command window one by one and it will tell you what properties and methods your instance of oMailItem supports. Check that HTMLBody is valid property.

hth
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform