Applescript for Insert Autonum

T

TomM

I have used a simple macro in Word for years to insert the Autonum field plus a tab for sequentially numbered paragraphs (which avoids having to use Automatic Numbering).

Now I find I cannot use it in Word 2008.

I have tried to write an Applescript

tell application "Microsoft Word"
insert field autonum at end of text object of active document
end tell

but being a newbie it doesn't work.

Can anyone help me - if I am unable to do this I shall have to go back to Word 2004.

Many thanks.
 
D

Daiya Mitchell

If someone provides a script, that would be nice--but actually you don't
*need* a macro/script to do this.

You can save the AutoNum field and the tab as an AutoText for quick
insertion. It's actually simpler to put an AutoText on a toolbar or
assign it a keyboard shortcut, than it is to do the same with a script,
and if you let Word, it will offer to enter it for you when you start
typing the name of the AutoText. (AutoText is also good for quick
insertion of tables, boilerplate, etc, but very handy for fields like this)

Create your field and tab, select it, and use Insert | AutoText | New to
create the AutoText.
More info here:
http://word.mvps.org/faqs/customization/AutoText.htm
(written for WinWord, but I think identical for the Mac--hit refresh a
few times if using Safari)

More info on putting things on toolbar/shortcut key:
http://word.mvps.org/mac/customizeToolbars.html

In this particular usage, another approach would be to create a numbered
list style that you apply, although fields can be easier to deal with
than styles.
 

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