メニュー バー、ツールバー、およびキー バインドへの変更が格納されるテンプレートまたはドキュメントを表す Template または Document オブジェクトを返または設定します。 値の取得と設定が可能です。 .
構文
expression。 CustomizationContext
式 'Global' オブジェクトを表す変数。
注釈
[ユーザー設定] ダイアログ ボックス ([ツール] メニュー) の [コマンド] タブにある [保存先] ボックスの値と対応します。
例
This example adds the ALT+CTRL+W key combination to the FileClose command. The keyboard customization is saved in the Normal template.
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, _
wdKeyAlt, wdKeyW), _
KeyCategory:=wdKeyCategoryCommand, Command:="FileClose"
この例では、[ファイル バージョン] ボタンを [Standard] ツールバーに追加します。 コマンド バーのユーザー設定は、作業中の文書に添付されたテンプレートに保存されます。
CustomizationContext = ActiveDocument.AttachedTemplate
Application.CommandBars("Standard").Controls.Add _
Type:=msoControlButton, _
ID:=2522, Before:=8
関連項目
サポートとフィードバック
Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。