DocumentBase.CommandBars 属性

获取一个 CommandBars 集合,该集合表示 Microsoft Office Word 中的菜单栏和所有工具栏。

命名空间:     Microsoft.Office.Tools.Word
程序集:   Microsoft.Office.Tools.Word.v4.0.Utilities(Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)

public CommandBars CommandBars { get; }
属性值
Type:  Microsoft.Office.Core.CommandBars

一个 CommandBars 集合,表示 Microsoft Office Word 中的菜单栏和所有工具栏。

在访问 CommandBars 集合之前,使用 P:Microsoft.Office.Interop.Word._Application.CustomizationContext 属性设置模板或文档上下文。

下面的代码示例使“绘图”工具栏在应用程序的底部可见。若要使用此示例,请从文档级项目内的ThisDocument类中运行此示例。

private void DocumentCommandBars()
{
    this.CommandBars["Drawing"].Visible = true;
    this.CommandBars["Drawing"].Position = Office.MsoBarPosition.msoBarBottom;
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值