Window.Activate Method (Publisher)

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