Finding macros if Office documents without opening them

A

AKA Bones

Does anyone know of a programatic way to determine whether a document /
spreadsheet / presentation contains one or more macros BEFORE the file is
opened?

We have a problem whereby macros in files are preventing our automated
process from completing because a macro has run and prompted the user for
input, but because we're opening the document using VB6 / .net using the
object model nothing is displayed so there's no way to close the prompt.

If we set the macro security in Word to high, all macros are prevented from
running but Word prompts the user when a document is opened which contains
macros: "The macros in this project are disabled. Please refer to the online
help or documentation of the host application to determine how to enable
macros.". This prompt also prevents our system for processing the document
due to the dialog box.

If anyone can help I would really appreciate it.

Cheers,
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top