Word) (Document.OpenEncoding 屬性
會傳回用來開啟指定的文件編碼方式。 唯讀 MsoEncoding 。
語法
expression. OpenEncoding
需要 expression。 代表 Document 物件的變數。
範例
這個範例會測試目前文件是否會以 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
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。