![]() |
syntax problem 'body format'
Hi,
I'm trying to send an html mail from a contact form with a button and VBS. I get the followin error message when excuting the procedure : incorrect argument 'body format' Does anyone understand what I'm getting wrong ? Thanks all, Philippe ----- code --- sub sendHtlmlMail_click() strTitle = "wanabe html" strMyBody = "bwanabe html message/b" Set myMail = Item.Application.CreateItem(olMailItem) With myMail ..To = strRecipients ..Subject = strTitle ..BodyFormat = olFormatHTML ..HTMLBody = strMyBody ..display End With End Sub ------------------ |
syntax problem 'body format'
The BodyFormat property was added in Outlook 2002. Earlier versions won't have it. You don't need it, though, because setting HTMLBody always puts a message into HTML format.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "philippe" wrote in message ... Hi, I'm trying to send an html mail from a contact form with a button and VBS. I get the followin error message when excuting the procedure : incorrect argument 'body format' Does anyone understand what I'm getting wrong ? Thanks all, Philippe ----- code --- sub sendHtlmlMail_click() strTitle = "wanabe html" strMyBody = "bwanabe html message/b" Set myMail = Item.Application.CreateItem(olMailItem) With myMail .To = strRecipients .Subject = strTitle .BodyFormat = olFormatHTML .HTMLBody = strMyBody .display End With End Sub ------------------ |
All times are GMT +1. The time now is 08:49 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com