Table of contents
Collapse the table of content
Expand the table of content

BorderArt Object (Publisher)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

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.


The BorderArts collection includes any custom BorderArt types created by the user for the specified publication.


Use the Item property of a 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.

This example returns the BorderArt "Apples" from the active publication.

Dim bdaTemp As BorderArt 

Set bdaTemp = ActiveDocument.BorderArts.Item (Index:="Apples") 

Use the Name property to specify which type of BorderArt you want applied to a picture. The following example sets all the BorderArt in a document to the same type 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

Note Because Name is the default property of both the BorderArt object and the BorderArtFormat object, you do not 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


© 2017 Microsoft