AutoOpen

Y

Yeager

Is there a way I can put code behind a specific document
to make it set certain options in word whenever it is
opened?

Specifically, I'm looking to change the way revision marks
are displayed ONLY for this one document.

Thanks,
Yeager
 
L

Larry

The revision marks specs are Word-wide. So you would need both an
AutoOpen macro for when you open the document, and an AutoClose macro
for when you close the document to return the revision marks to their
previous state.

Larry
 
Y

Yeager

Fair enough. But is it possible to put code behind a
specific document as opposed to a template?

-Yeager
 
L

Larry

Sure. Just as you put a macro in, say, the Normal template, you can put
a macro in a regular document. Open your VB editor (Alt+F11), make sure
your project explorer is displayed (Ctrl+R), and under the Project for
the current document, you'll see ThisDocument. Double click on that to
open the module and you can insert Auto macros or any macros in there.
You can also create a regular module by right-clicking the Objects
folder under Project and choosing Insert module. (I don't see that
there are any functional differences between ThisDocument module and the
Module1 module that's created through the right click, at least as far
as a simple Auto macro is concerned.)

Larry
 
Y

Yeager

Rockin'. Thanks a bunch!
-----Original Message-----
Sure. Just as you put a macro in, say, the Normal template, you can put
a macro in a regular document. Open your VB editor (Alt+F11), make sure
your project explorer is displayed (Ctrl+R), and under the Project for
the current document, you'll see ThisDocument. Double click on that to
open the module and you can insert Auto macros or any macros in there.
You can also create a regular module by right-clicking the Objects
folder under Project and choosing Insert module. (I don't see that
there are any functional differences between ThisDocument module and the
Module1 module that's created through the right click, at least as far
as a simple Auto macro is concerned.)

Larry





.
 

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

Similar Threads


Top