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

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