encoding Property

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - SAX2 Reference

encoding Property

Allows you to set the encoding according to HTML 4.0 specifications. MXHTMLWriter supports the same encoding as the Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office DOM. This parameter is ignored for output to a BSTR, but will take effect if output is changed in the middle of a document to a destination other than BSTR.

[Visual Basic]

Usage Syntax

oMXXMLWriter.encoding = strValue
strValue = oMXXMLWriter.encoding

Remarks

String. This property is read/write. The default is UTF-16. If your output is a string, the encoding parameter is ignored.

[C/C++]

Syntax

[propput]
HRESULT encoding (
   [in] BSTR strEncoding);
[propget]
HRESULT encoding (
   [out, retval] BSTR * strEncoding);

Parameters

strEncoding
The BSTR used to identify encoding.

Return Values

S_OK
The value returned if no errors are reported.

Remarks

The default string is UTF-16. If your output is a string, the encoding parameter is ignored.

To view reference material for Visual Basic or C++ only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

Character Encoding, XML, and MSXML | IMXWriter Interface | MXXMLWriter CoClass

Applies to: MXHTMLWriter CoClass