Superscript autotext

G

Guest

In the office here, we are wanting to set up a macro that finds and replaces
the following:

To find: sm (which means square metres)
To replace with: m2 (but with the 2 as superscript)

I personally have set up a macro for myself as I am typing to show the sq
metres the way it should display, but is there anyone who knows of a quick
remedy to find and replace within an existing document and then we can apply
this macro to a template for all in the office to use.

The difficulty of course is the fact that the 'm' needs stays as normal but
the '2' has to be in superscript.

Thanks
 
J

Jezebel

You can do it with two Find and Replace steps: first search for sm (with
'Find whole words only' checked) and replace with mXXX (XXX can be any
string that doesn't otherwise occur in your document). The search for XXX
(with 'Find whole words only' cleared) and replace with 2 formatted as
superscript.
 
H

Herb Tyson [MVP]

Perhaps an easier solution would be to create an AutoCorrect entry that
automatically replaces sm (or m2) with a propertly formatted m-squared as
either sm or m2 is typed. To do this, insert the m-squared as you want it to
appear, then select it. Then choose Tools - AutoCorrect Options. Next to
Replace, choose Formatted text. Under Replace, inscribe sm (actually, I
would use m2, instead, so the user can type what they expect to see, and the
2 will automatically get formatted correctly when m2 is replaced with
m-squared).

AutoCorrect entries are not stored in templates, but you can use the
technique shown here:

http://support.microsoft.com/kb/826147

to copy AutoCorrect entries from one computer to another.
 

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