xlf QandA series

How can I fit the Excel window to 720p resolution

QUESTION

I SPEND A LOT OF TIME RECORDING THE EXCEL WINDOW IN CAMTASIA STUDIO. I NEED AN EASY WAY OF SETTING THE WINDOW TO 720P RESOLUTION FOR UPLOAD TO YOUTUBE


Answer icon Answer

The VBA code needs to manipulate the Application Width and Height properties.

Details of the properties used in this module.


Application properties Description
Height set propertyA value that represents the height, in points, of the main application window
Width set propertyA value that represents the distance, in points, from the left edge of the application window to its right edge

Note: the 720p value refers to the height of the image in pixels. To convert image pixels to property points; points = pixels x 72 / 96

The setWindowTo720p procedure



Code 1: The setWindowTo720p macro: using the Application Width and Height properties
Sub SetWindowTo720p()
    With Application
        .WindowState = xlNormal
        .Top = 25
        .Left = 25
        .Width = 960    ' 960 points = 1280 pixels
        .Height = 540   ' 540 points = 720 pixels
    End With            ' 720p HD is 1280 wide x 720 high
End Sub                 ' 720p means 720 pixels of vertical resolution

Resources