Does a document contain a macro ?

B

bcaneau

Using Word 2002 and Win 98 SE. In a folder I have about 75 Word documents, most
of them written with Word 2000. In some of them I included graphics and one or
more CommandButtons so that the Click event on a button launches HH. EXE, and
with the proper syntax the user can read directly the corresponding help item
from WRDMAIN9.CHM. Having upgraded to Word XP I need to change my syntax to
direct the user to WRDMAIN10.CHM and the corresponding item.
Is there a possibility to find which of these documents have Command buttons
without opening them one at a time ?
Thanks
 
J

Jay Freedman

See the article at http://www.mvps.org/word/FAQs/MacrosVBA/DSOFile.htm and
get the ListProps.dot template from the link there. One of the properties it
can check is "Macros". Of course, this doesn't tell you what kind of macros
are in any document, but if this help macro is the only kind in all those
documents, you'll have no problem.

As a hint, you really shouldn't have macros in documents, only in templates.
The CommandButtons should be replaced with MacroButton fields, and they
should point to one or more macros in the common template. Then the upgrade
would be a 10-minute job.
 
B

bcaneau

Thank you very much, it is even more than I needed, but I shall have use of the
many properties revealed by dsofille.dll.
I have macros in documents because students must be able to save a file to a
diskett and use it at home. They are only event macros to bring up a help item,
from WRDMAIN9 or WRDMAIN10 according to the version they use at home.
Regards
B. Caneau
 

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