1

如何使用 vb.net 在 MS Word 或任何其他办公室中禁用另存为?

4

1 回答 1

1

您需要使用 VBA 宏来禁用另存为选项。在 Excel 中禁用的代码是:

 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
于 2012-09-28T15:53:15.030 回答