Thursday 15 September 2011

vba - Batch add a macro to word documents? -


I have several hundred Doc is the word document, from which I need to add a macro, when the .doc file is opened and based on the name of the file it creates a title for the document. Is there a way to do this as a batch? I am opening each document individually and going into Visual Basic - & gt; Project - & gt; This document then includes a .txt file that contains the code. Is there a fast way to do this for many documents?

As a learning exercise, it is common in VBE (Normal.dot template) Document "Part

Open a word document and see what happens.

I do not think you have to enter your code in every single file, I think you should be okay with using the Document_Open event in Normal.dot.

Just make sure that it appears as a reference to your word documents that you open but I do not think why it does not

It can be done, but the problem is that if you make a small change in the code, then you have to complete it again with the code to write once, use it several times.

No comments:

Post a Comment