In line...
Neil said:
Jay, can you expand on "a template, and not a document acting as a
phony template...". What are the differences and implications of
using one or the other?
Well, a lot of people never use templates other than the Normal.dot (or
Normal.dotm in Word 2007) that's the base for "new blank documents". When
they need a new document that's similar to an old document, they just open
the old document and use Save As to make a copy that they then modify.
That's what I meant by "a document acting as a phony template".
A real template, with a filename extension of .dot (in 2007, .dotx or
..dotm), has a few characteristics that aren't shared by documents. One of
those is that AutoText entries can't be stored in documents, only in
templates.
In 2003 and earlier, the default location for AutoText was Normal.dot. In
2007, the default is Building Blocks.dotx. In either case, by changing a
setting in the dialog when you create the entry, you can direct it to a
different template. If these watermarks are going to be used only in
documents based on one template, they should be stored in that template; if
they're needed more generally, they should be in the default location (in
your case, Building Blocks.dotx).
I am using Word 2007 and would appreciate a 2007 version.
I'll get back to you shortly -- after I've had a chance to write the macro
and test that I got it right.
I suspect the gnarly part is resizing the watermark text to suit.
Copying the watermark from a template would let Word handle all the
rotation and resizing, correct?
No, the idea is that you create, size, and otherwise format the watermark
only once, and store the result. That can be reused ad infinitum with no
further manipulation.
Is it possible to create a series of watermark autotext entries all
stored in the same template? e.g. Draft, Not For Tender, For
Coordination, Copy. I could then let the user pick from a list box.
Yes, all you need to do is give each entry a unique name.
From my investigations, I haven't been able to uniquely identify a
watermark object. Watermarks appear to be in the header/footer, to be
WordArt, and to be part of the Shapes collection. Unfortunately so
are some of the logos and tag lines that are in the documents. Do you
know how to be sure what you're about to delete is a watermark? (The
documents may have pre-existing watermarks so I don't know the item
name or the text that may be encountered.) For the watermarks I
create, I can name them for eazy selection and deletion.
The scheme you outlined before was that the watermark is present in the
document only as long as it takes to print. That's why the macro I showed
contains ".Undo" near the end -- the effect of that statement is to remove
the AutoText entry that was added at the beginning of the macro, just as if
you had clicked the Undo button. The watermark object in the document
doesn't have to be named or tagged in order to remove it. There's also no
confusion between the watermark and any pre-existing logo or other things in
the document; the "undo stack" knows what item was added last and how to
remove it.
The one possible concern, which you would have to test on your documents, is
whether the watermark causes the logo to be pushed to an incorrect position.
If so, you'll have to format the watermark (and possibly also the logo) to
allow overlap.