A
Associates
Hi,
I was wondering if i could get some help here. I'd like to be able to
disable all macros created/written in a document. What happens is that some
of our report documents have got some macros in it. We'd like to turn them
off so that our clients won't have to deal with macros when they receive our
reports. So my plan is to embed a code that would strip the macro off before
closing the document.
Here is the code i use
Private Sub oApp_DocumentBeforeClose(ByVal Doc As Document, Cancel As Boolean)
Dim msg1, msg2 As String
msg1 = "Attempting to disable macros..." + vbNewLine
' turn off macro
msg2 = "You're about to close the document"
MsgBox msg1 & msg2
End Sub
I found the following code from the internet as follows
WordBasic.DisableAutoMacros 1
I think WordBasic is for office 95 or something. Then, i try the following
code but unable to find "disablemacro" method
Application.activedocument...
Your help would be greatly appreciated.
Thank you in advance
I was wondering if i could get some help here. I'd like to be able to
disable all macros created/written in a document. What happens is that some
of our report documents have got some macros in it. We'd like to turn them
off so that our clients won't have to deal with macros when they receive our
reports. So my plan is to embed a code that would strip the macro off before
closing the document.
Here is the code i use
Private Sub oApp_DocumentBeforeClose(ByVal Doc As Document, Cancel As Boolean)
Dim msg1, msg2 As String
msg1 = "Attempting to disable macros..." + vbNewLine
' turn off macro
msg2 = "You're about to close the document"
MsgBox msg1 & msg2
End Sub
I found the following code from the internet as follows
WordBasic.DisableAutoMacros 1
I think WordBasic is for office 95 or something. Then, i try the following
code but unable to find "disablemacro" method
Application.activedocument...
Your help would be greatly appreciated.
Thank you in advance