'* +++++++++++++++++++++++++++++
'* Created By 守柔(ShouRou)@ExcelHome 2005-3-5 5:03:10
'仅测试于System: Windows NT Word: 10.0 Language: 2052
'^The Code CopyIn [ThisDocument-ThisDocument]^'
'* -----------------------------
Sub FileSaveAs()
'如果需要,应该将些代码粘贴于全局模板(Normal.dot-ThisDocument)中
Dim Ver As String, MySec As String, MyKey As String
On Error Resume Next '忽略错误
Ver = Application.Version '获得当前OFFICE版本号(WORD)
'注册表中项名称所在完整路径
MySec = "HKEY_CURRENT_USER\Software\Microsoft\Office\" & Ver _
& "\Common\Open Find\Microsoft Word\Settings\另存为\File Name MRU"
MyKey = "Value" '项名称
'设置该项值为""
System.PrivateProfileString("", MySec, MyKey) = ""
'打开另存为对话框
Application.FileDialog(msoFileDialogSaveAs).Show
End Sub
'----------------------
请将其粘贴于Normal.dot 的ThisDocument模块下,可以达到所有WORD活动文档在运行另存为时,执行上述代码过程。上述代码过程,又称修改WORD命令。
注意,如果你的注册表是保护的,可能会因此出错!
oBAzqrsZ.rar
(6.54 KB, 下载次数: 13)
[此贴子已经被作者于2005-3-5 5:10:30编辑过] |