This documentation is archived and is not being maintained.

_Document.TextEncoding Property 

Returns or sets the code page, or character set, that Microsoft Word uses for a document saved as an encoded text file.

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)

'Usage
Dim _Document1 As _Document

Dim returnValue As MsoEncoding
returnValue = _Document1.TextEncoding

Dim sampleValue As MsoEncoding
_Document1.TextEncoding = sampleValue

MsoEncoding TextEncoding {get; set;}
public MsoEncoding get_TextEncoding();
public void set_TextEncoding(MsoEncoding);
function get TextEncoding() : MsoEncoding;
function set TextEncoding(MsoEncoding);

The TextEncoding property sets text encoding separately from HTML encoding, which you can set using the Encoding property. To set text encoding for all documents saved as text files, use the DefaultTextEncoding property.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Show: