共用方式為


Word) (Border.ArtStyle 屬性

會傳回或設定圖形的頁面框線設計的文件。 讀取/寫入 WdPageBorderArt

語法

expression. ArtStyle

需要 expression。 代表 'Border' 物件的變數。

範例

本範例會在選取範圍中第一個區段的每個頁面四周新增黑點框線。

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

本範例會在使用中文件裡第一個區段的每個頁面四周新增圖片框線。

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

另請參閱

Border 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應