|
Office2003的帮助菜单,感觉不是太好,要找一些资料很不方便,动不动就在线搜索,要找的内容费时且不说,还常常找不到。其实office2003已经提供了大量很有益的帮助文件,只是没有出现在帮助菜单中而已。下面,我们就把它找出来,并出现在office2003的帮助菜单中。
1、在Normal模板的ThisDocument中添加如下VBA代码:
Private Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Sub VbaWDHlp() 'Word VBA帮助
'Shell "hh C:\Progra~1\Micros~2\OFFICE11\2052\VBAWD10.CHM"
ShellExecute 0&, "open", "VBAWD10.CHM", _
vbNullString, "C:\Program Files\Microsoft Office\OFFICE11\2052\", 1
End Sub
Sub WordHlp() 'Word帮助
ShellExecute 0&, "open", "WDMAIN11.CHM", _
vbNullString, "C:\Program Files\Microsoft Office\OFFICE11\2052\", 1
End Sub
Sub VBAHlp() 'VBA帮助
ShellExecute 0&, "open", "VBUI6.CHM", _
vbNullString, "C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\2052", 1
End Sub
Sub OfficeVBAHlp() 'Office VBA 帮助
ShellExecute 0&, "open", "VBAOF11.CHM", _
vbNullString, "C:\Program Files\Microsoft Office\OFFICE11\2052\", 1
End Sub
Sub DATABASEHlp() '数据库相关帮助
ShellExecute 0&, "explore", "C:\Program Files\Common Files\Microsoft Shared\OFFICE11\2052", _
vbNullString, vbNullString, 1
End Sub
2、在Word中点菜单“工具\自定义...”,扩充“帮助菜单”,增加几项并对应上述若干宏命令,然后适当修改命令的默认名称。
3、完成后,即可看到如下扩展后的菜单,然后点击相应的帮助菜单项试一试,呵呵,是不是很爽。其它的office组件比如Excel用类似方法处理。
<img src="attachments/dvbbs/2005-12/2005121511491411039.gif" border="0" alt="" />
[ 本帖最后由 gues1688 于 2011-1-6 08:56 编辑 ] |
-
[原创]扩展帮助菜单,让我们更加容易学习!
|