Document.TextEncoding Property
Gets or sets the code page, or character set, that Microsoft Office Word uses for a document saved as an encoded text file.
Namespace: Microsoft.Office.Tools.Word
Assemblies: Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)
Syntax
'Declaration
Property TextEncoding As MsoEncoding
MsoEncoding TextEncoding { get; set; }
Property Value
Type: Microsoft.Office.Core.MsoEncoding
One of the MsoEncoding values.
Remarks
This property sets text encoding separately from HTML encoding, which you can set using the Encoding property of the WebOptions object. You can get the WebOptions object from the WebOptions property. To set text encoding for all documents saved as text files, use the DefaultTextEncoding property.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.