Is this possible?
I need a macro to either delete itself after running, delete another macro after it has run (either way), or simply overwrite itself (or another macro). Basically just need to hide a macro after a user runs it. I have found multiple solutions for this and have tested them. They work, IF you enable "Trust Access to VBA Project Object Model" in the Word options.
Thoughts?
I have tried multiple similar versions of this but all require the option to be enabled:
Sub RemoveAll()
Application.DisplayAlerts = False
With ThisDocument.VBProject.VBComponents
.Remove .Item("Module1")
End With
End Sub
Thoughts? Thanks!
Bookmarks