如何在vb.net中的MS Word中禁用SaveAs [英] How to disable SaveAs in Ms word in vb.net
本文介绍了如何在vb.net中的MS Word中禁用SaveAs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用vb.net在MS Word或任何其他办公室中禁用另存为?
How can i disable Save as in MS word or in any other office using vb.net?
推荐答案
您需要使用VBA宏禁用另存为"选项. 在Excel中要禁用的代码是:
You need to use VBA Macro to disable Save As Option. Code to disable in Excel is :
Private Sub Workbook_BeforeSave (ByVal SaveAsUI As Boolean, Cancel As Boolean)
'This macro disables the "Save As" Feature in Excel
'This means that a user will not be able to save this
'workbook(file) under a different name or in a different location
'
'This MUST be placed in "ThisWorkbook" and NOT in a Module.
'
If SaveAsUI = True Then Cancel = True
End Sub
这篇关于如何在vb.net中的MS Word中禁用SaveAs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文