Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2005

Tip: Looking for answers? Try searching our database.

Word Commands in Word 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sherrysfarm228 - 01 Jul 2005 15:16 GMT
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
Klaus Linke - 01 Jul 2005 16:30 GMT
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

>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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.