Is an 'auto open' macro also initiated by a double-click event?

I was wondering whether an auto open macro to re-protect a word form also
did the same when the user double clicks the form to 'open'. Does it cover
all the bases?

Re: Auto Open Macros by Jonathan

Jonathan
Mon Jun 16 10:41:07 PDT 2008


"Lenny" <Lenny@discussions.microsoft.com> wrote in message
news:109A119F-EDC0-4436-AEF3-EF61BAD85D0B@microsoft.com...
> Is an 'auto open' macro also initiated by a double-click event?
>
> I was wondering whether an auto open macro to re-protect a word form also
> did the same when the user double clicks the form to 'open'. Does it
> cover
> all the bases?

AutoOpen will run irrespective of how you open the document provided that
all the following conditions are met

1. The code is in the document, or the code is in the attached template and
the template is accessible

2. The running of auto macros has not been disabled, either by security
settings, user action (holding down Shift while opening the document) or
code (WordBasic.DisableAutomacros 1 has not been run).

3. The document is being opened in Word itself, not in some other
application (e.g. Wordpad, the Word Viewer, Wordperfect etc)

4. You actually Open the document rather than creating a new document based
on it. (in this circumstance, AutoNew would run instead, provided auto macro
haven't been disabled because of one of the reasons described above)


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup



Re: Auto Open Macros by Lenny

Lenny
Mon Jun 16 11:04:01 PDT 2008

Jonathan: my thanks

"Jonathan West" wrote:

>
> "Lenny" <Lenny@discussions.microsoft.com> wrote in message
> news:109A119F-EDC0-4436-AEF3-EF61BAD85D0B@microsoft.com...
> > Is an 'auto open' macro also initiated by a double-click event?
> >
> > I was wondering whether an auto open macro to re-protect a word form also
> > did the same when the user double clicks the form to 'open'. Does it
> > cover
> > all the bases?
>
> AutoOpen will run irrespective of how you open the document provided that
> all the following conditions are met
>
> 1. The code is in the document, or the code is in the attached template and
> the template is accessible
>
> 2. The running of auto macros has not been disabled, either by security
> settings, user action (holding down Shift while opening the document) or
> code (WordBasic.DisableAutomacros 1 has not been run).
>
> 3. The document is being opened in Word itself, not in some other
> application (e.g. Wordpad, the Word Viewer, Wordperfect etc)
>
> 4. You actually Open the document rather than creating a new document based
> on it. (in this circumstance, AutoNew would run instead, provided auto macro
> haven't been disabled because of one of the reasons described above)
>
>
> --
> Regards
> Jonathan West - Word MVP
> www.intelligentdocuments.co.uk
> Please reply to the newsgroup
>
>
>