DocumentBase.WebOptions 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个 WebOptions 对象,该对象包含在您将文档另存为网页或者打开网页时,Microsoft Office Word 使用的文档级特性。
public Microsoft.Office.Interop.Word.WebOptions WebOptions { get; }
属性值
一个 WebOptions 对象,该对象包含在您将文档另存为网页或者打开网页时,Microsoft Office Word 使用的文档级特性。
示例
下面的代码示例指定将活动文档中的项保存到网页时使用的是级联样式表和西方文档编码。 若要使用此示例,请在 ThisDocument 文档级项目的类中运行它。
private void DocumentWebOptions()
{
this.WebOptions.RelyOnCSS = true;
this.WebOptions.Encoding = Office.MsoEncoding.msoEncodingWestern;
}
Private Sub DocumentWebOptions()
Me.WebOptions.RelyOnCSS = True
Me.WebOptions.Encoding = Office.MsoEncoding.msoEncodingWestern
End Sub