How do I store an autotext entry without storing the formatting?

D

Duh...

I want to store the DateSave field as an autotext entry. (Why? I can drag it
from there onto a custom toolbar - It's the only way I can find to get it
there!)

The problem is, when I insert the DateSave field into a document then make a
new autotext entry from it, when I insert it into a different document, it
appears in the font used in the source document.

This does not happen with the fields that come standard in the autotext list
(such as Filename) - those entries adopt the destination format. There is no
option for removing formatting in the autotext dialog box. (I'm using Word
2002.)

How can I store the field in the autotext and/or direct to my toolbar
without the formatting?
 
C

Cooz

Hi Duh...,

Use this macro:

Sub InsertDateSave()
ActiveDocument.AttachedTemplate.AutoTextEntries("DateSave").Insert _
Where:=Selection.Range, RichText:=False
End Sub

Replace "DateSave" with the name of the AutoText, and of course connect the
macro to the button on your cutsom toolbar rather than the autotext itself.

Consult http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm on how to
install the macro in Word.

Good luck,
Cooz
 
D

Duh...

Thanks, I will try that. But I'm thinhking that surely there must be a
simple way to store autotexts withour formatting?
 
J

Jean-Guy Marcil

Duh... was telling us:
Duh... nous racontait que :
Thanks, I will try that. But I'm thinhking that surely there must be
a simple way to store autotexts withour formatting?

Yes.
Normally, the paragraph marks carries the formatting because it carries the
style. So, make sure you can see the ¶ (click on the Show all button ¶ on
the standard toolbar).
Select your date making sure you *do not* also select the ¶.
Create the autotext.

Then, when you insert it, the date should pick up the formatting from the
paragraph in which it is being inserted.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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