Microsoft KB Archive/817882

= The body of an HTML message is displayed incorrectly when you change the code page in Outlook 2003 =

Article ID: 817882

Article Last Modified on 2/1/2007

-

APPLIES TO


 * Microsoft Office Outlook 2003
 * Microsoft Office Outlook 2003 with Business Contact Manager

-



SYMPTOMS
If your macro code sets the MailItem.InternetCodepage property before the HTML body of a message is loaded in Office Outlook 2003, the text in the message body may appear incorrectly.



WORKAROUND
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, see the following Microsoft Web site:

https://partner.microsoft.com/global/30000104

For additional information about the support options available from Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

The following code sample is an example of setting the MailItem.InternetCodepage to change the codepage from the Latin1 (1252) to Greek (1253): Sub TestReadHTML(ieDoc As String) Dim ieApp As SHDocVw.InternetExplorer Dim webDoc As Object Dim ol As New Outlook.Application Dim str As String Dim itm As MailItem Set ieApp = CreateObject(&quot;InternetExplorer.Application&quot;) ieApp.Visible = True ieApp.navigate ieDoc Set webDoc = ieApp.document Set itm = ol.CreateItem(0) itm.HTMLBody = webDoc.documentElement.outerHTML itm.InternetCodepage = 1253 Debug.Print itm.HTMLBody itm.Display End Sub



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Additional query words: OL2003 characters symbols

Keywords: kbautomation kbprogramming kbprb kbvba kbmacro kbnofix KB817882

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.