Word VBA教程:ArtStyle属性

返回或设置文档的艺术型页面边框。WdPageBorderArt,可读写。

WdPageBorderArt 可以是下列 WdPageBorderArt 常量之一:
wdArtSeattle
wdArtSharksTeeth
wdArtSkyrocket
wdArtSnowflakes
wdArtSouthwest
wdArtStars3D
wdArtStarsShadowed
wdArtSun
wdArtTornPaper
wdArtTrees
wdArtTriangles
wdArtTribal2
wdArtTribal4
wdArtTribal6
wdArtTwistedLines2
wdArtWaveline
wdArtWeavingBraid
wdArtWeavingStrips
wdArtWoodwork
wdArtZanyTriangles
wdArtZigZagStitch
wdArtCirclesLines
wdArtClassicalWave
wdArtCompass
wdArtConfettiGrays
wdArtConfettiStreamers
wdArtCornerTriangles
wdArtCouponCutoutDots
wdArtCreaturesButterfly
wdArtCreaturesInsects
wdArtScaredCat
wdArtShadowedSquares
wdArtShorebirdTracks
wdArtSnowflakeFancy
wdArtSombrero
wdArtStars
wdArtStarsBlack
wdArtStarsTop
wdArtSwirligig
wdArtTornPaperBlack
wdArtTriangleParty
wdArtTribal1
wdArtTribal3
wdArtTribal5
wdArtTwistedLines1
wdArtVine
wdArtWeavingAngles
wdArtWeavingRibbon
wdArtWhiteFlowers
wdArtXIllusions
wdArtZigZag
wdArtChristmasTree
wdArtCirclesRectangles
wdArtClocks
wdArtConfetti
wdArtConfettiOutline
wdArtConfettiWhite
wdArtCouponCutoutDashes
wdArtCrazyMaze
wdArtCreaturesFish
wdArtCreaturesLadyBug
wdArtCrossStitch
wdArtCup
wdArtDecoArch
wdArtDecoArchColor
wdArtDecoBlocks
wdArtDiamondsGray
wdArtDoubleD
wdArtDoubleDiamonds
wdArtEarth1
wdArtEarth2
wdArtEclipsingSquares1
wdArtEclipsingSquares2
wdArtEggsBlack
wdArtFans
wdArtFilm
wdArtFirecrackers
wdArtFlowersBlockPrint
wdArtFlowersDaisies
wdArtFlowersModern1
wdArtFlowersModern2
wdArtFlowersPansy
wdArtFlowersRedRose
wdArtFlowersRoses
wdArtFlowersTeacup
wdArtFlowersTiny
wdArtGems
wdArtGingerbreadMan
wdArtGradient
wdArtHandmade1
wdArtHandmade2
wdArtHeartBalloon
wdArtHeartGray
wdArtHearts
wdArtHeebieJeebies
wdArtHolly
wdArtHouseFunky
wdArtHypnotic
wdArtIceCreamCones
wdArtLightBulb
wdArtLightning1
wdArtLightning2
wdArtMapleLeaf
wdArtMapleMuffins
wdArtMapPins
wdArtMarquee
wdArtMarqueeToothed
wdArtMoons
wdArtMosaic
wdArtMusicNotes
wdArtNorthwest
wdArtOvals
wdArtPackages
wdArtPalmsBlack
wdArtPalmsColor
wdArtPaperClips
wdArtPapyrus
wdArtPartyFavor
wdArtPartyGlass
wdArtPencils
wdArtPeople
wdArtPeopleHats
wdArtPeopleWaving
wdArtPoinsettias
wdArtPostageStamp
wdArtPumpkin1
wdArtPushPinNote1
wdArtPushPinNote2
wdArtPyramids
wdArtPyramidsAbove
wdArtQuadrants
wdArtRings
wdArtSafari
wdArtSawtooth
wdArtSawtoothGray
wdArtApples
wdArtArchedScallops
wdArtBabyPacifier
wdArtBabyRattle
wdArtBalloons3Colors
wdArtBalloonsHotAir
wdArtBasicBlackDashes
wdArtBasicBlackDots
wdArtBasicBlackSquares
wdArtBasicThinLines
wdArtBasicWhiteDashes
wdArtBasicWhiteDots
wdArtBasicWhiteSquares
wdArtBasicWideInline
wdArtBasicWideMidline
wdArtBasicWideOutline
wdArtBats
wdArtBirds
wdArtBirdsFlight
wdArtCabins
wdArtCakeSlice
wdArtCandyCorn
wdArtCelticKnotwork
wdArtCertificateBanner
wdArtChainLink
wdArtChampagneBottle
wdArtCheckedBarBlack
wdArtCheckedBarColor
wdArtCheckered

expression.ArtStyle

expression   必需。该表达式返回“应用于”列表中的一个对象。

VBA示例

本示例为所选内容的第一节的每个页面添加由黑点构成的边框。


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

Word VBA教程

Word VBA参考教程:目录1 Word VBA参考教程:目录2
Word VBA参考教程:目录3 Word VBA参考教程:目录4
Word VBA参考教程:目录5 Word VBA参考教程:目录6
Word VBA参考教程:目录7 Word VBA参考教程:目录8
Word VBA参考教程:目录9 Word VBA参考教程:目录10
版权所有 © 中山市飞娥软件工作室 证书:粤ICP备09170368号