Skip to content

Latest commit

 

History

History
48 lines (28 loc) · 1.14 KB

Word.Document.TextEncoding.md

File metadata and controls

48 lines (28 loc) · 1.14 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Document.TextEncoding property (Word)
vbawd10.chm158007653
vbawd10.chm158007653
Word.Document.TextEncoding
a11b45c1-1829-0df0-3403-e92268d9ec81
06/08/2017
medium

Document.TextEncoding property (Word)

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

Syntax

expression. TextEncoding

expression Required. A variable that represents a Document object.

Remarks

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.

Example

This example sets the text encoding for the active document to Japanese if it is saved as a text file.

Sub EncodeText() 
 ActiveDocument.TextEncoding = msoEncodingJapaneseShiftJIS 
End Sub

See also

Document Object

[!includeSupport and feedback]