(Publisher) 的 BorderArt 物件
代表可用的框線藝術師類型。 框線藝術師是可套用到文字方塊、 圖片框或矩形的圖片框線。 框線藝術師 物件是 BorderArts 集合的成員。 BorderArts 集合包含所有框線藝術師中所指定出版物的使用。
註解
BorderArts 集合包含任何指定出版物之使用者所建立的自訂框線藝術師類型。
使用BorderArts集合的Item屬性可傳回特定的 BorderArt 物件。 Item 屬性的 Index 引數可以是框線藝術師物件的編號或名稱。
使用 Name 屬性來指定您想要的框線藝術師的類型套用至圖片。
注意事項
由於 Name 是 BorderArt 物件和 BorderArtFormat 物件的預設屬性,因此您不需要在設定 BorderArt 類型時明確陳述。 語句 Shape.BorderArtFormat = Document.BorderArts(1)
相當於 Shape.BorderArtFormat.Name = Document.BorderArts(1).Name
。
範例
本範例會從使用中出版物傳回名為 Apples 的 BorderArt。
Dim bdaTemp As BorderArt
Set bdaTemp = ActiveDocument.BorderArts.Item (Index:="Apples")
下列範例會使用 Name 屬性,將檔中的所有 BorderArt 設定為相同的類型。
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
屬性
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。