1. Home
  2. Computing & Technology
  3. Visual Basic
VBA - The Word Working Partner
Word Objects
 More of this Feature
• Part 1: Using VBA with Microsoft Word
• Part 2: Automate Your Letter Writing
• Part 3: The AboutVBA.DOC Code Sample
• Part 5: The Automated Tutorial Review Program
• Part 6: Using Toolbox Components
 
 Join the Discussion
Create a brilliant VBA app?
Tell Us About It!
 
 Related Resources
• Segment One of the VBA Tutorial
• The About Visual Basic Subjects List
• Beginning Visual Basic
• Visual Basic 6
 
 From Other Guides
• About Desktop Publishing for MS Word
• About Business Software
 
 Elsewhere on the Web
• MS: Word Objects
• MS: Templates vs Add-In's
 

If you have written Visual Basic 6 programs, but no Word VBA programs, you'll notice a lot of methods and properties you haven't seen before. Every VBA enabled application adds a new set and it's very difficult to remember them for all of the different applications. At the same time, you need to know what they are and how to use them. They're the key to the VBA treasure house. You need help! One of the best ways to get help is by using the Record Macro function described in the Introduction tutorial here. In the example on the previous page,

Selection.EndKey Unit:=wdLine, Extend:=wdExtend

is almost entirely composed of obscure Word VBA keywords. When I was writing this tutorial, I learned what they were from a recorded macro.

Record New Macro options

This is a good place to suggest another tip. When using Record Macro, avoid cluttering up the Normal template with your experimental code (or with your completed code unless you really do want to add your program more or less permanently to Word). Save your code in your own document. Or create a another template and save it there. This is something you have to remember to do since the Normal template is the default in Record Macro (even though it probably shouldn't be).

Next page > The Automated Tutorial Review Program > Page 1, 2, 3, 4, 5, 6
Explore Visual Basic
By Category
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic

©2009 About.com, a part of The New York Times Company.

All rights reserved.