Table of contents
Collapse the table of content
Expand the table of content

Application.Windows2 Property (Project)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Gets a Windows2 collection representing the open windows in the application. Read-only Windows2.


expression. Windows2

expression A variable that represents an Application object.


The Windows2 property is recommended, in place of the Windows property, for all new development in VBA and external applications developed with the .NET Framework.


The following example cascades all the open windows.

Sub CascadeWindows() 
 Dim I As Integer 

 ActiveWindow.WindowState = pjNormal ' Restore the window. 

 With Application.Windows2 
 For I = 1 To .Count 
 .Item(I).Top = (I - 1) * 15 
 .Item(I).Left = (I - 1) * 15 
 Next I 
 End With 

End Sub
© 2018 Microsoft