Wednesday, June 3, 2020

VBA Word Document Object 1

Dim variable_name As Document

' binding variable name object to document object
Set variable_name = ActiveDocument

Set variable_name = ThisDocument

Set variable_name = Documents("file name.extension")
' or
Set variable_name = Documents("file name.extension")

' the first document in the Documents collection.
Set variable_name = Documents(1)

No comments:

Post a Comment