Options.DefaultTextEncoding property (Word)

Returns or sets an MsoEncoding constant representing the code page, or character set, that Microsoft Word uses for all documents saved as encoded text files. Read/write.

Syntax

expression. DefaultTextEncoding

expression Required. A variable that represents an Options object.

Remarks

Use the TextEncoding property to set the encoding for an individual document. To set encoding for HTML documents, use the Encoding property.

Example

This example sets the global text encoding to the Western code page. This means that Word will save all encoded text files using the Western code page.

Sub DefaultEncode() 
 Application.Options.DefaultTextEncoding = msoEncodingWestern 
End Sub

See also

Options Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.