This documentation is archived and is not being maintained.

PictureFormat.IncrementContrast Method

Office 2007
Changes the contrast of the picture by the specified amount.

Syntax

expression.IncrementContrast(Increment)

expression   A variable that represents a PictureFormat object.

Parameters

NameRequired/OptionalData TypeDescription
IncrementRequiredSingleSpecifies how much to change the value of the Contrast property for the picture. A positive value increases the contrast; a negative value decreases the contrast. Valid values are between – 1 and 1.

Remarks

You cannot adjust the contrast of a picture past the upper or lower limit for the Contrast property. For example, if the Contrast property is initially set to 0.9 and you specify 0.3 for the Increment argument, the resulting contrast level will be 1.0, which is the upper limit for the Contrast property, instead of 1.2.

Use the Contrast property to set the absolute contrast for the picture.

Example

This example increases the contrast for all pictures on the first page of the active publication that aren't already set to maximum contrast.

Visual Basic for Applications
Dim shpLoop As Shape

For Each shpLoop In ActiveDocument.Pages(1).Shapes
    If shpLoop.Type = msoPicture Then
        shpLoop.PictureFormat.IncrementContrast Increment:=0.1
    End If
Next shpLoop



Show: