简体   繁体   中英

How to disable SaveAs in Ms word in vb.net

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM