• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 39. Introducing Visual Basic for... > Recording and Modifying VBA Modules

Recording and Modifying VBA Modules

As an introduction to Visual Basic for Applications modules, you are going to let Word write the first module. Word's Macro Recorder records all your interactions with a document as a sequence of Visual Basic commands. These commands form a macro procedure that you can execute to replay your interactions. This capability is especially useful for formatting complex documents, because after you have recorded the formatting, you only have to replay the procedure to format another document.

Automating with Visual Basic for Applications

Visual Basic for Applications is a marriage between one of the most common programming languages and all the character formatting and text management power of the Word application. The language is not merely tacked onto Word, but has full access to all of Word's commands and structure. Because Word now supports Visual Basic for Applications, a programmer is not geared primarily toward task automation. A programmer can write an application that prompts a user for information and based on that information, the program performs different actions. A programmer can create an application that uses Word as the main host application, but with the use of OLE Automation, he or she can incorporate a variety of functionality from applications such as Excel and PowerPoint. Imagine being able to create an application that assists a user in the creation of a corporate quarterly report containing balance sheets and charts from Excel and also generates a slideshow based on the completed quarterly report in PowerPoint. This is just a small example of what you can do with Visual Basic for Applications.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint