Share via


Item Property [Publisher 2003 VBA Language Reference]

Item property as it applies to the Adjustments object.

Returns or sets a Variant indicating the adjustment value specified by the Index argument. Read/write.

expression.Item(Index)

expression Required. An expression that returns one of the above objects.

Index  Required Integer. The index number of the adjustment.

Remarks

AutoShapes, connectors, and WordArt objects can have up to eight adjustments.

For linear adjustments, an adjustment value of 0.0 generally corresponds to the left or top edge of the shape, and a value of 1.0 generally corresponds to the right or bottom edge of the shape. However, adjustments can pass beyond shape boundaries for some shapes. For radial adjustments, an adjustment value of 1.0 corresponds to the width of the shape. For angular adjustments, the adjustment value is specified in degrees.

The Item property applies only to shapes that have adjustments.

Item property as it applies to the ColorSchemes object.

Returns the specified ColorScheme object from a ColorSchemes collection. Read-only.

expression.Item(Index)

expression Required. An expression that returns one of the above objects.

PbColorScheme

PbColorScheme can be one of these PbColorScheme constants.
pbColorSchemeAlpine
pbColorSchemeAqua
pbColorSchemeBerry
pbColorSchemeBlackGray
pbColorSchemeBlackWhite
pbColorSchemeBrown
pbColorSchemeBurgundy
pbColorSchemeCavern
pbColorSchemeCelebration
pbColorSchemeCherry
pbColorSchemeCitrus
pbColorSchemeClay
pbColorSchemeCranberry
pbColorSchemeCrocus
pbColorSchemeCustom
pbColorSchemeDarkBlue
pbColorSchemeDesert
pbColorSchemeField
pbColorSchemeFirstUserDefined
pbColorSchemeFjord
pbColorSchemeFloral
pbColorSchemeGarnet
pbColorSchemeGlacier
pbColorSchemeGreen
pbColorSchemeHeather
pbColorSchemeIris
pbColorSchemeIsland
pbColorSchemeIvy
pbColorSchemeLagoon
pbColorSchemeLilac
pbColorSchemeMahogany
pbColorSchemeMarine
pbColorSchemeMaroon
pbColorSchemeMeadow
pbColorSchemeMist
pbColorSchemeMistletoe
pbColorSchemeMonarch
pbColorSchemeMoss
pbColorSchemeMountain
pbColorSchemeMulberry
pbColorSchemeNavy
pbColorSchemeNutmeg
pbColorSchemeOcean
pbColorSchemeOlive
pbColorSchemeOrange
pbColorSchemeOrchid
pbColorSchemeParrot
pbColorSchemePeach
pbColorSchemePebbles
pbColorSchemePrairie
pbColorSchemePurple
pbColorSchemeRainForest
pbColorSchemeRed
pbColorSchemeRedwood
pbColorSchemeReef
pbColorSchemeSagebrush
pbColorSchemeSapphire
pbColorSchemeShamrock
pbColorSchemeSienna
pbColorSchemeSpice
pbColorSchemeSunrise
pbColorSchemeSunset
pbColorSchemeTeal
pbColorSchemeTidepool
pbColorSchemeTropics
pbColorSchemeTrout
pbColorSchemeVineyard
pbColorSchemeWaterfall
pbColorSchemeWildflower

Item property as it applies to the MasterPages and Pages objects.

Returns the specified Page object from a Pages or MasterPages collection. Read-only.

expression.Item(Item)

expression Required. An expression that returns one of the above objects.

Item  Required Long. The number of the page to return. For MasterPages collections, Item can either be 1 or 2 for the left and right master pages, respectively. For Pages collections, Item corresponds to a Page object's PageIndex property.

Item property as it applies to all the other objects in the Applies to list.

Returns an individual object from a specified collection. Read-only.

expression.Item(Index)

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

Index  Required Long. The number of the object to return.

Example

As it applies to the Adjustments object.

This example adds two crosses to the active publication and then sets the value for adjustment one (the only one for this type of AutoShape) on each cross.

With ActiveDocument.Pages(1).Shapes
    .AddShape(Type:=msoShapeCross, Left:=10, Top:=10, Width:=100, _
        Height:=100).Adjustments.Item(1) = 0.4
    .AddShape(Type:=msoShapeCross, Left:=150, Top:=10, Width:=100, _
        Height:=100).Adjustments.Item(1) = 0.2
End With

This example has the same result as the previous example even though it doesn't explicitly use the Item property.

With ActiveDocument.Pages(1).Shapes
    .AddShape(Type:=msoShapeCross, Left:=10, Top:=10, Width:=100, _
        Height:=100).Adjustments(1) = 0.4
    .AddShape(Type:=msoShapeCross, Left:=150, Top:=10, Width:=100, _
        Height:=100).Adjustments(1) = 0.2
End With

As it applies to the ColorSchemes object.

This example sets the color scheme of the active publication to the Aqua color scheme.

ActiveDocument.ColorScheme = ColorSchemes.Item(Index:=pbColorSchemeAqua)

This example displays the address of the first hyperlink in shape one of the active publication.

MsgBox "Address of first hyperlink: " _
    & ActiveDocument.Pages(1).Shapes(1) _
    .TextFrame.TextRange.Hyperlinks.Item(1).Address

As it applies to the MasterPages and Pages object.

This example displays the page number, page index, and page ID of the first page in the active publication.

With ActiveDocument.Pages.Item(1)
    Debug.Print "Page number = " & .PageNumber
    Debug.Print "Page index = " & .PageIndex
    Debug.Print "Page ID = " & .PageID
End With

As it applies to the Plates object.

This example displays the name of the first color plate in the active publication.

MsgBox "Name of first color plate: " _
    & ActiveDocument.Plates.Item(1).Name

As it applies to the RulerGuides object.

This example sets the position of the first ruler guide to 3 inches from the edge of the publication.

ActiveDocument.Pages(1).RulerGuides _
    .Item(1).Position = InchesToPoints(3)

Applies to | Adjustments Object | ColorSchemes Collection | ColorsInUse Collection | Documents Collection | Hyperlinks Collection | Labels Collection | MasterPages Collection | Pages Collection | Plates Collection | PrintablePlates Collection | RulerGuides Collection | Sections Collection | WizardProperties Collection | WizardValues Collection