DefaultWebOptions.Encoding 属性 (Word)

返回或设置文档编码 (代码页或字符集) ,供 Web 浏览器在查看保存的文档时使用。 读/写

语法

表达式编码

expression 是必需的。 一个代表 DefaultWebOptions 集合的变量。

示例

本示例检查默认编码方式是否为 Western,然后设置相应的 strDocEncoding 字符串。

Dim strDocEncoding As String 
 
If Application.DefaultWebOptions.Encoding _ 
 = msoEncodingWestern Then 
 strDocEncoding = "Western" 
Else 
 strDocEncoding = "Other" 
End If

另请参阅

DefaultWebOptions 对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。