Previous Document Next Document

Object Model Reference : Classes : W : Window : Methods : Window.Close


Window.Close

Sub Close()

Description

Member of Window

The Close method closes a window.

 
When you close an active file, you are pompted to save it.
VBA example

The following VBA example closes the first window in the Windows collection if it contains more than one window.

Sub Test()
 Dim Wnd As Window
 If ActiveDocument.Windows.Count > 1 Then
  Set Wnd = ActiveDocument.Windows(1)
  Wnd.Close
 End If
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.