PixelsPerInch Property

Microsoft Word Visual Basic

expression.PixelsPerInch

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

This property determines the size of the images and cells on the specified Web page relative to the size of text whenever you view the saved document in a Web browser. The physical dimensions of the resulting image or cell are the result of the original dimensions (in inches) multiplied by the number of pixels per inch.

Use the ScreenSize property to set the optimum screen size for the targeted Web browsers.

Example

This example sets the pixel density depending on the target screen size of the Web browser.

With Application.DefaultWebOptions
    Select Case .ScreenSize
        Case msoScreenSize800x600
            .PixelsPerInch = 72
        Case msoScreenSize1024x768
            .PixelsPerInch = 96
        Case Else
            .PixelsPerInch = 120
    End Select
End With