1
出於某種原因,我在我的normal.dotm文件的快捷方式獲取了一會兒刪除一次,
所以我知道我可以通過點擊單詞圍繞在Word中創建快捷方式(https://wordribbon.tips.net/T008058_Assigning_a_Macro_to_a_Shortcut_Key.html)創建鍵盤熱鍵/在Word快捷鍵使用VBA
,但我想他們硬編碼,而不是像我在Excel中做的:
Sub keyBoardShortCuts()
Application.OnKey "%^d", "updateDB"
Application.OnKey "%^p", "openProjectList"
Application.OnKey "%^m", "addNewLS"
Application.OnKey "%^l", "createLS"
Application.OnKey "%^g", "loadGui"
Application.OnKey "%^b", "Custom_Button_Click"
End Sub
Private Sub Workbook_Open()
Call keyBoardShortCuts
End Sub
然而,這並不字工作,所以什麼是語法詞這樣做呢?