Class PictureFormat (Word VBA)

Contains properties and methods that apply to pictures and OLE objects. The LinkFormat object contains properties and methods that apply to linked OLE objects only. The OLEFormat object contains properties and methods that apply to OLE objects whether or not they're linked.

Set

To use a PictureFormat class variable it first needs to be instantiated, for example

Dim pft as PictureFormat
Set pft = ActiveDocument.Background.PictureFormat

The following procedures can be used to set variables of type PictureFormat: ChartFormat.PictureFormat, InlineShape.PictureFormat, Shape.PictureFormat and ShapeRange.PictureFormat

Properties

Brightness returns or sets the brightness of the specified picture or OLE object. The value for this property must be a number from 0.0 (dimmest) to 1.0 (brightest).

ActiveDocument.Background.PictureFormat.Brightness =

ColorType returns or sets the type of color transformation applied to the specified picture or OLE object.

ActiveDocument.Background.PictureFormat.ColorType =

Contrast returns or sets the contrast for the specified picture or OLE object. The value for this property must be a number from 0.0 (the least contrast) to 1.0 (the greatest contrast).

ActiveDocument.Background.PictureFormat.Contrast =

Crop returns or sets a Crop object that represents an image cropping.

ActiveDocument.Background.PictureFormat.Crop =

CropBottom returns or sets the number of points that are cropped off the bottom of the specified picture or OLE object.

ActiveDocument.Background.PictureFormat.CropBottom =

CropLeft returns or sets the number of points that are cropped off the left side of the specified picture or OLE object.

ActiveDocument.Background.PictureFormat.CropLeft =

CropRight returns or sets the number of points that are cropped off the right side of the specified picture or OLE object.

ActiveDocument.Background.PictureFormat.CropRight =

CropTop returns or sets the number of points that are cropped off the top of the specified picture or OLE object.

ActiveDocument.Background.PictureFormat.CropTop =

Parent returns an object that represents the parent object of the specified PictureFormat object.

Dim objParent As Object
Set objParent = ActiveDocument.Background.PictureFormat.Parent

TransparencyColor returns or sets the transparent color for the specified picture as a red-green-blue (RGB) value.

ActiveDocument.Background.PictureFormat.TransparencyColor = RGB(0,0,255)'blue

TransparentBackground msoTrue if the parts of the picture that are defined with a transparent color actually appear transparent. Use the TransparencyColor property to set the transparent color. Applies to bitmaps only.

ActiveDocument.Background.PictureFormat.TransparentBackground =