Table of contents
TOC
Collapse the table of content
Expand the table of content

Window.Activate Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Activates a window or OLE object.

Syntax

expression. Activate

_expression_A variable that represents a Window object.

Return Value

Nothing

Remarks

Because Publisher runs in a single window, using the Activate method with a Window object makes Publisher the active application.

Example

The following example makes Publisher the active application.

Application.ActiveWindow.Activate

The following example adds an Excel spreadsheet to the first page of the active publication and activates the spreadsheet for editing.

Dim shpSheet As Shape 

Set shpSheet = ActiveDocument.Pages(1).Shapes.AddOLEObject _ 
 (Left:=72, Top:=72, ClassName:="Excel.Sheet") 

shpSheet.OLEFormat.Activate
© 2018 Microsoft