How to check, if a macro exists before starting it...

K

Karl Zuern

I would like to check, if a special macro exists before I try to start is.
Is there a collection of all avaible macros available?
Thanks for help.

Regards
Karl.
 
J

Jonathan West

Karl Zuern said:
I would like to check, if a special macro exists before I try to start is.
Is there a collection of all available macros available?
Thanks for help.

Well, there is, but it requires special reduced security in Word for you to
be able to get at it. If you are only running this on your own PC, you won't
need that because you already know whether this macro is available. On other
people's PCs, you won't be able to guarantee that the reduced security
setting is in place.

What could can do is to call the macro by means of the Application.Run
method, and use the On Error Goto command to trap the error that occurs if
the macro is not present.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
K

Karl Zuern

Jonathan, thanks for information. So I am going to use the on error goto
method.
Regards Karl.
 
Top