Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Aug 2003
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Trap disable macros button click (word97, word 2000)

    When a document with macros is opened, Word displays a dialog box prompting the user to enable or disable macros in the document.. I want to be able to trap the disable macros button click thru VB .. How do i do it?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Trap disable macros button click (word97, word 2000)

    There are programs that can watch for a variety of screen dialogs and respond to/dismiss them. For example, someone recommended Buzof from Basta Computing. I haven't tried it myself.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Trap disable macros button click (word97, word 2000)

    That would defeat the purpose, wouldn't it? The prompt is to give the user a chance not to run a macro if (s)he doesn't trust the document. If you were able to trap it and reply 'Enable'...

    Or do I misunderstand your question?

  4. #4
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Trap disable macros button click (word97, word 2000)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> su1234

    Why do you ask? Do you want to write a virus, or keep your code from not becoming disabled?

    Hum as Hans said, it does defeat the intention of that security measure. In fact the Melissa virus was one of the first to exploit this particular idea.

    You can do many things that can be legitimate and also keep the security level somewhat protective.

    1) Sign your VBA Code. You can get a digital signature, or make one yourself, subscribe this signature and the code is understood to be "Good", thus the security alert will not fire. Mind you, you will have to register and pay for a corporate signature, but you can shop around.

    2) Lower the security to a level that allows code to run without any notification, and hire a whole bunch of people to worry about viruses and hacker and what have you.

    If #2 is not an issue, like its your own machine and code, then go for it, but again, its one added level of security.

    HTH

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •