BorderArt object (Publisher)
Represents an available type of BorderArt. BorderArt is picture borders that can be applied to text boxes, picture frames, or rectangles. The BorderArt object is a member of the BorderArts collection. The BorderArts collection contains all BorderArt available for use in the specified publication.
Remarks
The BorderArts collection includes any custom BorderArt types created by the user for the specified publication.
Use the Item property of the BorderArts collection to return a specific BorderArt object. The Index argument of the Item property can be the number or name of the BorderArt object.
Use the Name property to specify which type of BorderArt you want applied to a picture.
Note
Because Name is the default property of both the BorderArt object and the BorderArtFormat object, you don't need to state it explicitly when setting the BorderArt type. The statement Shape.BorderArtFormat = Document.BorderArts(1)
is equivalent to Shape.BorderArtFormat.Name = Document.BorderArts(1).Name
.
Example
This example returns the BorderArt named Apples from the active publication.
Dim bdaTemp As BorderArt
Set bdaTemp = ActiveDocument.BorderArts.Item (Index:="Apples")
The following example sets all the BorderArt in a document to the same type by using the Name property.
Sub SetBorderArtByName()
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
.Name = strBorderArtName
End If
End With
Next anyShape
Next anyPage
End Sub
Properties
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for