Word automation with VFP 6

Author: Tom Libby

Posted: 2001-01-05 at 13:35:01

Hi everyone,

I am automating MS Word 97 SR-2 from VFP 6. Everything is working fine

except for two things I need to do and cannot figure it out how:

1. How to determine if a document contains a macro.

2. How do I stop macros from running when I open the doc.

I have been at the MS site going through the Office developer documentation

and cannot find anything on this.

The problem is I need to scan these documents and determine what types of

objects are in them (hyperlinks, images, macros, document version etc...).

If I try to open the doc using Word it informs me the document contains

macros and lets me determine if I want to run them or not. But if I open it

using automation then the macro runs with no warning. Since I have no idea

who is sending these documents I would prefer not to run the macros. I

tried setting oWord.DisplayAlerts = -1 (Show all alerts) but that ddoes

nothing for macros. Any ideas?

Thanks

Tom

Shop Safely Online Without a Credit Card

http://www.rocketcash.com

©2001 Tom Libby