none
enable macro automaticaly RRS feed

  • Question

  • Hi,

    I'dlike to open word document and avoid the warning "Clicke here to enable Macro".

    I don't want to modify the configuration of word.

    What can i do to avoid this warning ? (Apply certificate ?, Tag in OpenXml ?)

    Thank you.

    eGm


    Monday, May 23, 2011 2:21 PM

Answers

  • Hi eGm

    If you look in File/Options/Trust Center you'll see the various kinds of things Word (Office) will accept in order to avoid going into sandbox mode. For example

    1. You can sign the VBA project digitally. Once that digital signature has been accepted as a "trusted publisher" the macro should run. Either the network administrator or the user should be able to set the "trusted publisher". If this is for your private use, you can use selfcert.exe (delivered with Office) to generate a non-distributable digital signature for your private use - no need to buy one

    2. The file with the macro can be stored in a "trusted location". By default, the user's "My Documents" folder is trusted. Other trusted locations can be set by the user or a network administrator. I'm not sure whether you'd categorize this as changing the configuration of Word (I wouldn't, but I suppose that's borderline).


    Cindy Meister, VSTO/Word MVP
    Monday, May 23, 2011 3:44 PM
    Moderator

All replies

  • Which version of Word? The security settings vary quite a bit between versions...
    Cindy Meister, VSTO/Word MVP
    Monday, May 23, 2011 2:36 PM
    Moderator
  • Hi,

    Office 2010

    eGm

    Monday, May 23, 2011 2:55 PM
  • Hi eGm

    If you look in File/Options/Trust Center you'll see the various kinds of things Word (Office) will accept in order to avoid going into sandbox mode. For example

    1. You can sign the VBA project digitally. Once that digital signature has been accepted as a "trusted publisher" the macro should run. Either the network administrator or the user should be able to set the "trusted publisher". If this is for your private use, you can use selfcert.exe (delivered with Office) to generate a non-distributable digital signature for your private use - no need to buy one

    2. The file with the macro can be stored in a "trusted location". By default, the user's "My Documents" folder is trusted. Other trusted locations can be set by the user or a network administrator. I'm not sure whether you'd categorize this as changing the configuration of Word (I wouldn't, but I suppose that's borderline).


    Cindy Meister, VSTO/Word MVP
    Monday, May 23, 2011 3:44 PM
    Moderator