Global.ActiveDocument Property
Word Developer Reference |
Returns a Document object that represents the active document (the document with the focus). Read-only.
Syntax
expression.ActiveDocument
expression A variable that represents a Global object.
Remarks
If there are no documents open, using this property causes an error.
Example
This example displays the name of the active document, or if there are no documents open, it displays a message.
Visual Basic for Applications |
---|
|
This example collapses the selection to an insertion point and then creates a range for the next five characters in the selection.
Visual Basic for Applications |
---|
|
This example inserts texts at the beginning of the active document and then prints the document.
Visual Basic for Applications |
---|
|
See Also