What is "WordBasic"?

R

RWN

In trolling around the various Word ng's I see reference to "WordBasic"
and, in some situations, the implication is that it has more
functionality to it than VBA.
The VBA "Help" facility (Wd2k) give me the impression that VBA's Object
Oriented approach replaces WordBasic.

My question is, what does WordBasic have going for it that VBA doesn't?
 
J

Jonathan West

WordBasic is two things.

1. The macro language that was available in Word 95 and older versions of
Word.

2. An object within Word VBA which allows many of the old WordBasic commands
to be used within VBA code.

The Wordbasic object was included in VBA mainly to assist with converting
Word 95 templates and macros onwards to Word 97. If you open a Word 95
template in Word 7 or later and then save it, the Wordbasic code is
converted to VBA, and mainly consists of lines starting with the WordBasic
object.

In most cases, writing VBA code without the WordBasic object is easier as
there is mucb more power in the VBA object-oriented approach. But
occasionally, the Wordbasic object allows you to do things which the rest of
VBA can't manage. Take a look here for come examples.

Useful WordBasic commands that have no VBA equivalent
http://www.mvps.org/word/FAQs/MacrosVBA/WordBasicCommands.htm

Also, the paramaters of the Wordbasic commands are mostly the same as the
arguments for the built-in dialogs, so having the old WordBasic help file
can help with understanding how to show and manipulate the built-in dialogs.
More on this here

Getting help with calling Word's built-in dialogs using VBA (and why doing
so can be much more useful than you'd think)
http://www.mvps.org/word/FAQs/MacrosVBA/WordDlgHelp.htm
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Hi RWN,

Word.Basic was the macro language used in versions of Word prior to Word97
when VBA was implemented. While it is true that there are some WordBasic
functions that have no equivalent in VBA, VBA is far more powerful and those
functions can generally still be implemented in VBA by prefixing them with
WordBasic.[Function]

An example is give in the article "How can I sort an array?” at:

http://www.mvps.org/word/FAQs/MacrosVBA/SortArray.htm

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 

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