Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.44 KB

Project.Project.Windows.md

File metadata and controls

51 lines (32 loc) · 1.44 KB
title ms.service api_name ms.assetid ms.date ms.localizationpriority
Project.Windows property (Project)
project-server
Project.Project.Windows
6096d9b0-c6ba-3e48-9265-f3e8448d293f
06/08/2017
medium

Project.Windows property (Project)

Gets a Windows collection representing the open windows in the project. Read-only Windows.

Syntax

expression.Windows

expression A variable that represents a Project object.

Remarks

The Windows property duplicates the Windows2 property, except that it returns a Windows collection rather than a Windows2 collection. The Windows2 property and Windows2 collection object are recommended for all new development both in VBA and for external applications developed with the .NET Framework. The Windows property and Windows collection are maintained for backward compatibility with existing applications.

Example

The following example cascades all the open windows in the active project.

Sub CascadeWindows() 
 Dim I As Integer 
 
 ActiveWindow.WindowState = pjNormal ' Restore the window. 
 
 With ActiveProject.Windows 
 For I = 1 To .Count 
 .Item(I).Activate 
 .Item(I).Top = (I - 1) * 15 
 .Item(I).Left = (I - 1) * 15 
 Next I 
 End With 
 
End Sub

[!includeSupport and feedback]