Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Outlook Redemption
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="John, post: 5442339"] Hi I am using the latest redemption. I am using the below code in vb.net to send mail in html format. The problem is that text does not get sent as html and html tags appear as they are in the message like '<HTML>' etc. Any idea what I am doing wrong? Thanks Regards Yahya Imports Outlook Imports System.Runtime.InteropServices.Marshal Imports Redemption Const PR_InetMailOverrideFormat = &H59020003 Const ENCODING_PREFERENCE = &H20000 Const BODY_ENCODING_TEXT_AND_HTML = &H100000 Const ENCODING_MIME = &H40000 Const PR_MSG_EDITOR_FORMAT = &H59090003 Const EDITOR_FORMAT_PLAINTEXT = 1 Const EDITOR_FORMAT_HTML = 2 Const vbLFCR = Chr(10) & Chr(13) Dim SafeItem As Redemption.SafeMailItem Dim oItem As Object ' Dim oItem As Outlook.MailItem Dim Utils As Redemption.MAPIUtils Dim ol As Outlook.Application Dim Btn As Office.CommandBarButton Dim ns As Outlook.NameSpace ol = New Outlook.Application ns = ol.GetNamespace("MAPI") ns.Logon() oItem = ol.CreateItem(OlItemType.olMailItem) SafeItem = New Redemption.SafeMailItem 'Create an instance of Redemption.SafeMailItem SafeItem.Fields(PR_InetMailOverrideFormat) = ENCODING_PREFERENCE Or ENCODING_MIME Or BODY_ENCODING_TEXT_AND_HTML SafeItem.Fields(PR_MSG_EDITOR_FORMAT) = EDITOR_FORMAT_HTML SafeItem.Item = oItem 'set Item property oItem.To = "[email]info@infovis.co.uk[/email]" SafeItem.Recipients.ResolveAll() SafeItem.Subject = "Testing html in Redemption" ' <== Error: Property Subject not supported SafeItem.Body = "<HTML>" & vbLFCR & _ "<HEAD>" & vbLFCR & _ "<TITLE>Message</TITLE>" & vbLFCR & _ "<BODY>" & vbLFCR & _ "<p><strong>This is just a test html file to demo html emailing.</strong></p>" & vbLFCR & _ "<p><BR>" & vbLFCR & _ "</p>" & vbLFCR & _ "</BODY>" & vbLFCR & _ "</HTML>" SafeItem.Send() Utils = New Redemption.MAPIUtils Utils.DeliverNow() Btn = ol.ActiveExplorer.CommandBars.FindControl(1, 5488) Btn.Execute() Utils.Cleanup() [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Outlook Redemption
Top