- Core Concepts
- VBA is embedded in Microsoft Word for programmatic processing
- Word Object Library contains classes for programmatic Word interaction
- Word Object Model follows Application → Document → Range structure
- Key Objects
- Application represents Word application itself and provides access to model
- Documents collection contains all open Word documents
- Ranges represent document areas and contain various content types
- Paragraphs, Words, and Sentences collections contain document content
- Document Management
- Documents can be opened, closed, and saved using specific methods
- Range objects provide methods for copying, cutting, and formatting
- ContentControl objects manage document formatting and content
- MailMerge object enables MailMerge feature functionality
- Search and Analysis
- Find object performs text search operations
- Various matching options available through properties
- Document.ComputeStatistics retrieves content statistics
- Context determines implied object references in VBA code