"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
Class: CWord
Working with Microsoft Word through Automation Word includes full support for interacting with Word as an automation server, and for working with documents. This class supplies several high-level methods that make it easy to work with Word and Word documents.
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the CWord class
|
|
AppWord
|
Property
|
Gets a handle to the Word application
|
|
CurDocument
|
Property
|
Gets a handle to the current document
|
|
DocumentProperties
|
Property
|
Sets the value of the specified document property
|
|
BatchConvert
|
Method
|
Converts all in a given directory documents from one type to another
|
|
CloseDocument
|
Method
|
Closes the current document
|
|
CloseWord
|
Method
|
Closes the instance of Word
|
|
CreateTableFromAccess
|
Method
|
Gets the contents of an Access table or query into the current document.
|
|
FileSearchToArray
|
Method
|
Uses the Office FileSearch facility to locate all files that match the specified parameters.
|
|
FindFiles
|
Method
|
Uses the Office FileSearch facility to locate all files that match the specified parameters.
|
|
InsertText
|
Method
|
Inserts text at the current insertion point into the current document
|
|
InsertTextFromFile
|
Method
|
Inserts text from a text file into the current document
|
|
NameWithoutExtension
|
Private
|
Removes the extension from a filename
|
|
NewDocument
|
Method
|
Creates a new word document
|
|
OpenDocument
|
Method
|
Opens the named document
|
|
OpenWithDialog
|
Method
|
Opens a file by interacting with a Word dialog.
Note: This method does not set the newly opened document to the class current document.
|
|
PrintDocument
|
Method
|
Prints the current document
|
|
PrintDocumentEX
|
Method
|
Prints the current document using extended parameters
|
|
SaveCurrent
|
Method
|
Saves the current document
|
|
SaveCurrentAs
|
Method
|
Saves the current document under a new name
|
|
SearchAndReplace
|
Method
|
Runs search and replace on the current document with the specified options
|
|
SetWindowState
|
Method
|
Sets the Window state for the Word application
|
|
StartWord
|
Method
|
Starts an instance of Word
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|