Selection Object
Publisher Developer Reference |
Represents the current selection in a window or pane. A selection represents either a selected (or highlighted) area in the publication, or it represents the cursor if nothing in the publication is selected. There can only be one Selection object per publication window pane, and only one Selection object in the entire application can be active.
Example
Use the Selection property to return the Selection object. If no object qualifier is used with the Selection property, Microsoft Office Publisher returns the selection from the active pane of the active publication window. The following example copies the current selection from the active publication.
Visual Basic for Applications |
---|
|
The following example determines what type of item is selected and, if it is an autoshape, fills the first shape in the selection with color. This example assumes there is at least one item selected in the active pubication.
Visual Basic for Applications |
---|
|
The following example copies the selection and pastes it into the first shape on the second page of the active publication.
Visual Basic for Applications |
---|
|
See Also