Previous Document Next Document
Window.Activate

Sub Activate()

Member of Window

The Activate method opens a window (if it is not currently open) and makes it the active window.

In some cases, operating systems such as Windows 98, Windows 2000, and later don’t allow the application to activate itself, to prevent intervention with the current activity. If the application is not granted active status, the application window starts flashing in the taskbar, but it does not appear in the foreground.

The following code example sets the last window in the collection as the foreground window:

Sub Test() 
 Dim Wnd As Window 
 Set Wnd = ActiveDocument.Windows(ActiveDocument.Windows.Count) 
 Wnd.Activate 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.