Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 1.54 KB

Project.Application.DocSize.md

File metadata and controls

60 lines (38 loc) · 1.54 KB
title keywords f1_keywords ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.DocSize method (Project)
vbapj.chm2017
vbapj.chm2017
project-server
Project.Application.DocSize
03eb42ef-748e-ef42-a453-8305b0e2835c
06/08/2017
medium

Application.DocSize method (Project)

Sets the width and height of the active window.

Syntax

expression. DocSize( _Width_, _Height_, _Points_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
Width Optional Long A number that specifies the new width of the active window.
Height Optional Long A number that specifies the new height of the active window.
Points Optional Boolean True if Width and Height are measured in points. False if they are measured in pixels. The default value is False.

Return value

Boolean

Example

The following example tiles the windows of open projects vertically within the main window of Project.

Sub TileProjectWindowsVertically() 
 
    Dim I As Long   ' Index used in For...Next loop 
     
    For I = 1 To Application.Windows.Count 
        Windows(I).Activate 
        DocSize Width:=UsableWidth / Windows.Count, Height:=UsableHeight, Points:=True 
        DocMove XPosition:=(I - 1) * UsableWidth / Windows.Count, YPosition:=0, Points:=True 
    Next I 
End Sub

[!includeSupport and feedback]