Word) (Application.ListCommands 方法

建立新的文件,然後插入 Word 指令目錄以及其關聯的快速鍵和功能表設定。

語法

expressionListCommands( _ListAllCommands_ )

需要 expression。 代表 Application 物件的變數。

參數

名稱 必要/選用 資料類型 描述
ListAllCommands 必要 Boolean True 可包含所有的 Word 命令和其指派 (不論是自訂或內建)。 False 包含具有自訂的工作分派的命令。

範例

這則範例會建立新的文件,其中列出所有 Word 指令以及其關聯的快速鍵和功能表設定。 然後,此範例會列印並關閉新文件,但不儲存變更。

Application.ListCommands ListAllCommands:=True 
With ActiveDocument 
 .PrintOut 
 .Close SaveChanges:=wdDoNotSaveChanges 
End With

另請參閱

Application 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應