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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.