Muokkaa

Jaa


Border.ArtStyle property (Word)

Returns or sets the graphical page-border design for a document. Read/write WdPageBorderArt.

Syntax

expression. ArtStyle

expression Required. A variable that represents a 'Border' object.

Example

This example adds a border of black dots around each page in first section in the selection.

Dim borderLoop As Border 
 
For Each borderLoop In Selection.Sections(1).Borders 
 With borderLoop 
 .ArtStyle = wdArtBasicBlackDots 
 .ArtWidth = 6 
 End With 
Next borderLoop

This example adds a picture border around each page in section one in the active document.

Dim borderLoop As Border 
 
With ActiveDocument.Sections(1) 
 .Borders.AlwaysInFront = True 
 For Each borderLoop In .Borders 
 With borderLoop 
 .ArtStyle = wdArtPeople 
 .ArtWidth = 15 
 End With 
 Next borderLoop 
End With

See also

Border Object

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.