Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Determine Macro status - enabled/disabled
I have a template that I have created that must use the macros attached to it. I want to be able to use the AutoOpen macro to check to see if macros are enabled on the user system. If they are not, I would like to pop up a message box saying that macros must be enabled to use this form and when they click okay, close the document. It seems like there should be a read only object or property that would tell me if the macros are enabled or disabled. I DO NOT want to try to programatically change the users macro security settings. Any help would be appreciated. -- BethW |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Determine Macro status - enabled/disabled
Unfortunately, if macros are disabled on the system, then the AutoOpen
macro (and all other macros) won't run. Period. It's a good thing you don't want to try to programmatically change the user's macro security settings, because it can't be done. (If you could do it, so could a virus writer...) One possible partial solution is to put instructions at the beginning of the template for how to set the security level to enable macros, or at least to get the warning message that lets the user choose whether to enable them. Write an AutoNew macro into the template that hides or deletes those instructions. Thus, if macros are already enabled when the new document is created, the instructions won't appear. If the macros are disabled, the instructions will remain visible. You can't do anything about closing the document, though. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. On Sat, 16 Sep 2006 19:05:53 +0100, BethW wrote: I have a template that I have created that must use the macros attached to it. I want to be able to use the AutoOpen macro to check to see if macros are enabled on the user system. If they are not, I would like to pop up a message box saying that macros must be enabled to use this form and when they click okay, close the document. It seems like there should be a read only object or property that would tell me if the macros are enabled or disabled. I DO NOT want to try to programatically change the users macro security settings. Any help would be appreciated. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Form Generaters in Word | Microsoft Word Help | |||
macro produces error message | Microsoft Word Help | |||
Macro Button Won't Stay on Toolbar | Microsoft Word Help | |||
Possible bug when recording a Word Macro | Microsoft Word Help | |||
2000 to 2002 macro and "Could not open macro storage" | Mailmerge |