Options.DefaultTextEncoding Property (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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.

expression .DefaultTextEncoding

expression Required. A variable that represents an Options collection.

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

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
Show: