How can I identify Word docs that have VB modules attached?

G

GeoBob

How can you identify Word Documents that have VB modules attached to them
without having to open the documents?

Several months ago I had a lot of standard formatting to do on multiple
tables in multiple documents. I created a macro (and converted it to a VB
module) that did a great job of adding column headings and formatting the
table, but now I can't find the macro. I thought I had stored the macro in
Normal, but it seems that's not the case. I created so many documents, both
final versions and test versions, that I don't want to have to open each to
search for my missing macro.

Is there some way to identify Word documents that have a VB module attached?
 
H

Helmut Weber

Hi GeoBob,

lots of long forgotten command line utilities
are still around, like "find".

In the cmd-shell in the appropriate folder:
find "end sub" *.doc

Might help.

Still, the files have to be openend in a way.
Yet not with Word as application.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
G

GeoBob

Thanks Helmut,

The old things are still often the best things. It never occured to me 1)
to resort to the DOS prompt and b) that the VB code was still in text format
within the Word documents.

Your idea worked great! The only problem is, it found a bunch of other
documents with VB code in them that I would have never expected of having
macros, let alone VB code. I'm afraid of letting my curiosity get the better
of me - and that kind of thing can kill a day!!

Thanks again Helmut,

Geobob
 

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