Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
BethW BethW is offline
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Generaters in Word Graham Beaumont Microsoft Word Help 2 May 17th 06 07:11 PM
macro produces error message Kimmie B Microsoft Word Help 11 March 14th 06 11:25 PM
Macro Button Won't Stay on Toolbar caleb Microsoft Word Help 2 June 14th 05 11:59 PM
Possible bug when recording a Word Macro Raven95 Microsoft Word Help 4 April 30th 05 09:49 PM
2000 to 2002 macro and "Could not open macro storage" Art Farrell Mailmerge 1 December 6th 04 12:40 PM


All times are GMT +1. The time now is 08:30 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"