OpenEncoding 属性

       

返回用于打开指定文档的编码。MsoEncoding,只读。

expression.OpenEncoding

expression   必需。该表达式返回“应用于”列表中的一个对象。

示例

本示例实现的功能是:测试当前文档是否使用编码 UTF7 打开。

If ActiveDocument.OpenEncoding = msoEncodingUTF7 Then
    MsgBox "This is a UTF7-encoded text file!"
Else
    MsgBox "This is not a UTF7-encoded text file!"
End If