A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

syntax problem 'body format'



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 3rd 06, 01:49 AM posted to microsoft.public.outlook.program_forms
philippe
external usenet poster
 
Posts: 14
Default 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
------------------
Ads
  #2  
Old May 3rd 06, 02:00 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default 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
------------------

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Invalid syntax error on some URL links in OE Alan J Robertson Outlook Express 28 April 1st 06 04:45 PM
Invalid Syntax Error?? F. Edwin Felty Outlook Express 5 March 31st 06 05:02 PM
Problem with format of meeting invites received via e-mail Casper Outlook - Calandaring 1 March 16th 06 08:48 PM
i get a message that says outlook addins are missing-syntax prob bilbobo Outlook - General Queries 5 January 23rd 06 03:50 PM
path syntax while registering msoe.dll Tom Penharston Outlook Express 3 January 22nd 06 05:09 PM


All times are GMT +1. The time now is 08:58 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-2025 Outlook Banter.
The comments are property of their posters.