Word Commands in Word 2003

S

Sherrysfarm228

I would like to know if you can use the word commands listed on the Macro
dialog box in a macro I create? I have not been able to utilize these
commands but it seems like you should be able to include them in a set of
instructions? I know how to create macros but would like to add a couple of
the commands to my macros - please advise... thanks
 
K

Klaus Linke

Hi,

Since they are already built-in commands, you don't need to write macros for
them.

You can add all of them to some toolbar, or assign keyboard shortcuts for
them, directly in Tools > Customize.

If you really want/need to put them in a macro, put "WordBasic." in front of
the command's name, say:
WordBasic.FileSave

Most times, it's easy and "cleaner" to find some corresponding VBA code.
And most times, recording the command will give you at least some VBA code
to start with.

One case when WordBasic.SomeCommand is handy is when you want to intercept
some command with a macro.
In many cases, you then want the macro to do something special in some
circumstances, and act as usual in others:

Sub NextCell()
If myCondition
runMyCode
Else
WordBasic.NextCell
End If
End Sub

Regards,
Klaus
 

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