Share via


Set Method [Publisher 2003 VBA Language Reference]

Sets the type of BorderArt applied to the specified shape.

expression.Set()

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

BorderArtName Required String. The name of the BorderArt type applied to the specified shape.

Remarks

You can also set the type of BorderArt applied to a shape using the Name property.

Example

The following example tests for the existence of BorderArt on each shape for each page of the active document. Any BorderArt found is set to the same type.

Sub SetBorderArt()
Dim anyPage As Page
Dim anyShape As Shape
Dim strBorderArtName As String

strBorderArtName = Document.BorderArts(1).Name
    
For Each anyPage in ActiveDocument.Pages
        For Each anyShape in anyPage.Shapes
            With anyShape.BorderArt
                If .Exists = True Then
                    .Set(strBorderArtName)
                End If
            End With
        Next anyShape
    Next anyPage
End Sub

Applies to | BorderArtFormat Object