Ignore pre-existing macros ? 
Author Message
 Ignore pre-existing macros ?

Macro question,

    I am creating a macro to update templates.  However,
some of the existing templates already have macros upon
opening the files.
    What code can I use to ignore the automatic macros
that appear when the document is opened.  I would rather
have the program bypass these instead of me having to
manually exit the forms that pop up on start up.

I appreciate any advice anyone can offer me.

Dan



Tue, 30 Nov 2004 21:48:56 GMT  
 Ignore pre-existing macros ?
Hi Dan

Take a look at this article

Useful WordBasic commands that have no VBA equivalent
http://www.mvps.org/word/FAQs/MacrosVBA/WordBasicCommands.htm

Scroll down to the section on DisableAutoMacros.

If you are using Word 2002, you can do the same thing by means of the
AutomationSecurity property. There is a code example in the Word VBA help
file.

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email



Quote:
> Macro question,

>     I am creating a macro to update templates.  However,
> some of the existing templates already have macros upon
> opening the files.
>     What code can I use to ignore the automatic macros
> that appear when the document is opened.  I would rather
> have the program bypass these instead of me having to
> manually exit the forms that pop up on start up.

> I appreciate any advice anyone can offer me.

> Dan



Tue, 30 Nov 2004 22:48:03 GMT  
 Ignore pre-existing macros ?
I thought that AutomationSecurity prevented/enabled ALL macros, not just the
Auto* macros?

--
http://www.standards.com/; Programming and support for  Word macros,
including converting from WordBasic to VBA; Technical reviewing; Standards;
Product functional/design/specifications
------------------------------------------------

Quote:
> Hi Dan

> Take a look at this article

> Useful WordBasic commands that have no VBA equivalent
> http://www.mvps.org/word/FAQs/MacrosVBA/WordBasicCommands.htm

> Scroll down to the section on DisableAutoMacros.

> If you are using Word 2002, you can do the same thing by means of the
> AutomationSecurity property. There is a code example in the Word VBA help
> file.

> --
> Regards
> Jonathan West - Word MVP
> MultiLinker - Automated generation of hyperlinks in Word
> Conversion to PDF & HTML
> http://www.multilinker.com
> Word FAQs at http://www.multilinker.com/wordfaq
> Please post any follow-up in the newsgroup. I do not reply to Word
questions
> by email



> > Macro question,

> >     I am creating a macro to update templates.  However,
> > some of the existing templates already have macros upon
> > opening the files.
> >     What code can I use to ignore the automatic macros
> > that appear when the document is opened.  I would rather
> > have the program bypass these instead of me having to
> > manually exit the forms that pop up on start up.

> > I appreciate any advice anyone can offer me.

> > Dan



Wed, 01 Dec 2004 06:05:21 GMT  
 Ignore pre-existing macros ?
Hi, Dan,

Look at http://www.mvps.org/word/FAQs/MacrosVBA/WordBasicCommands.htm. About
halfway down is a description of the WordBasic.DisableAutoMacros command, which
does what you want.

--
Regards,
Jay Freedman
Microsoft Word MVP        Word MVP FAQ site: http://www.mvps.org/word

Quote:

> Macro question,

>     I am creating a macro to update templates.  However,
> some of the existing templates already have macros upon
> opening the files.
>     What code can I use to ignore the automatic macros
> that appear when the document is opened.  I would rather
> have the program bypass these instead of me having to
> manually exit the forms that pop up on start up.

> I appreciate any advice anyone can offer me.

> Dan



Sat, 04 Dec 2004 05:12:14 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Mail Merge to a pre-existing word document via a macro

2. creating record sets in pre existing tables

3. automatically placing VBA code into pre-existing Office files

4. Make a Label from code without any pre-existing label on the form

5. Dynamically adding a pre-existing control

6. Add parameters to a pre-existing VB event ??

7. How to add a pre-existing UserControl ??

8. Loading a pre-existing file at Run-Time

9. Loading a pre-existing form at run-time ?

10. Using a pre-existing recordset to generate report

11. create report from pre-existing recordset

12. Loading a pre-existing form at Run-Time ?

 

 
Powered by phpBB® Forum Software