Table using autotext/macro?

V

Vijay J.

I am using one-row-two-column tables to hold my equations
and corresponding equation-captions (one such table for
each equation+caption). As suggested on the mvps website
in a couple of newsgroups, I am using this very effective
technique of putting equations in such tables in the
following way: I insert the table, make it borderless
(Ctrl+Alt+U), make the right column smallest to hold the
caption, make the text in the table Centred as well as
the table itself (as per my requirements), put the
equation in left column and insert caption in right
column.

Currently, I am using a macro (Tools>macro>record new
macro..) which does everything mentioned above in one
keystroke. I have following queries:
(1) Can a style be defined to make such a table? Because
if I want to change the formatting of table later, I will
have to do it manually for each table, but if a style is
defined and changed later, it can change all tables at
the same time.
(2) Is macro a good way of doing the things which I am
doing? I have a feeling that macros are prone to viruses
(???), as sometimes Word gives a warning message while
opening documents containing macros?
(3) Can autotext be used as an alternative, and how? I
have never used autotext before.
Vijay
 
S

Suzanne S. Barnhill

An AutoText entry is the usual suggestion. This has the advantage of
allowing you to insert a dummy equation and a caption in one stroke. If you
want to change the format of the entry, you can redefine it. Unfortunately,
unlike modifying a style, this has no effect on equations already entered.
But you can and should define styles for the equation and caption themselves
(the paragraphs in the respective cells of the table).
 
J

Jay Freedman

Hi Vijay,

My answers follow your questions below...

--
Regards,
Jay Freedman
Microsoft Word MVP
I am using one-row-two-column tables to hold my equations
and corresponding equation-captions (one such table for
each equation+caption). As suggested on the mvps website
in a couple of newsgroups, I am using this very effective
technique of putting equations in such tables in the
following way: I insert the table, make it borderless
(Ctrl+Alt+U), make the right column smallest to hold the
caption, make the text in the table Centred as well as
the table itself (as per my requirements), put the
equation in left column and insert caption in right
column.

Currently, I am using a macro (Tools>macro>record new
macro..) which does everything mentioned above in one
keystroke. I have following queries:
(1) Can a style be defined to make such a table? Because
if I want to change the formatting of table later, I will
have to do it manually for each table, but if a style is
defined and changed later, it can change all tables at
the same time.

In Word 2002 or 2003 you can define a table style, but you have to insert
the table itself and then apply the style to it. The style determines the
table's appearance (colors, borders, shading, etc.) but not the number of
columns or their widths. Applying the style to a paragraph does not
automatically insert the table; it just displays the Insert Table dialog.
(2) Is macro a good way of doing the things which I am
doing? I have a feeling that macros are prone to viruses
(???), as sometimes Word gives a warning message while
opening documents containing macros?

You shouldn't have any fear of macros, and they aren't "prone to viruses" --
some people can write macros that are viruses, just as some people can write
other kinds of programs that are viruses, but simply having macros doesn't
mean you'll get viruses. In this case, though, a macro is probably not
necessary.

The drawback of using a macro is that, unless you take specific steps, Word
will want to disable your macro. Microsoft has been more-or-less forced into
this drastic position because there is the possibility that any given macro
may be a virus, and it's difficult to determine which ones can be trusted.
(3) Can autotext be used as an alternative, and how? I
have never used autotext before.

Yes, autotext is the best alternative for this case.

Create an empty table and format it as you want. You can place an empty
equation in the larger cell and a sample caption in the smaller cell as
placeholders. Select the entire table. If you want the autotext to be
available in all your documents, just press Alt+F3 and supply a name for the
autotext, and the table will be stored in the autotext entries of the global
template normal.dot. If you need it only in a specific template used for
this kind of document, instead go to Insert > AutoText > AutoText and change
the Look In box to that specific template before giving a name and clickin
the Add button.

When you want a new equation, type the name of the autotext. When you get to
the fourth letter (or more until you get to the first unique character in
the name) a tooltip will appear, and you can press Enter or Tab to insert
the table. (Or you can use the Insert > AutoText menu to select your entry,
or record a macro of inserting the autotext.) When the table appears,
double-click the empty equation object to start editing it.

For more information about AutoText, see
http://www.word.mvps.org/faqs/customization/AutoText.htm.
 

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