|
楼主 |
发表于 2017-6-9 19:23
|
显示全部楼层
- Sub 非导入图片的方式()
- With ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1)
- .NumberFormat = ChrW(61618)
- .TrailingCharacter = wdTrailingTab
- .NumberStyle = wdListNumberStyleBullet
- .NumberPosition = CentimetersToPoints(0)
- .Alignment = wdListLevelAlignLeft
- .TextPosition = CentimetersToPoints(0.74)
- .TabPosition = wdUndefined
- .ResetOnHigher = 0
- .StartAt = 1
- With .Font
- .Bold = wdUndefined
- .Italic = wdUndefined
- .StrikeThrough = wdUndefined
- .Subscript = wdUndefined
- .Superscript = wdUndefined
- .Shadow = wdUndefined
- .Outline = wdUndefined
- .Emboss = wdUndefined
- .Engrave = wdUndefined
- .AllCaps = wdUndefined
- .Hidden = wdUndefined
- .Underline = wdUndefined
- .Color = wdUndefined
- .Size = wdUndefined
- .Animation = wdUndefined
- .DoubleStrikeThrough = wdUndefined
- .Name = "Wingdings"
- End With
- .LinkedStyle = ""
- End With
- ListGalleries(wdBulletGallery).ListTemplates(1).Name = ""
- Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
- ListGalleries(wdBulletGallery).ListTemplates(1), ContinuePreviousList:= _
- False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
- wdWord10ListBehavior
- End Sub
复制代码- Sub 导入图片的方式添加自动编号()
- With ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1)
- .NumberFormat = ChrW(61548)
- .TrailingCharacter = wdTrailingTab
- .NumberStyle = wdListNumberStylePictureBullet
- .NumberPosition = CentimetersToPoints(0)
- .Alignment = wdListLevelAlignLeft
- .TextPosition = CentimetersToPoints(0.74)
- .TabPosition = wdUndefined
- .ResetOnHigher = 0
- .StartAt = 1
- With .Font
- .Bold = wdUndefined
- .Italic = wdUndefined
- .StrikeThrough = wdUndefined
- .Subscript = wdUndefined
- .Superscript = wdUndefined
- .Shadow = wdUndefined
- .Outline = wdUndefined
- .Emboss = wdUndefined
- .Engrave = wdUndefined
- .AllCaps = wdUndefined
- .Hidden = wdUndefined
- .Underline = wdUndefined
- .Color = wdColorAutomatic
- .Size = wdUndefined
- .Animation = wdUndefined
- .DoubleStrikeThrough = wdUndefined
- .Name = "Symbol"
- End With
- .LinkedStyle = ""
- End With
- ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1). _
- ApplyPictureBullet FileName:="D:\1.png"
- ListGalleries(wdBulletGallery).ListTemplates(1).Name = ""
- Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
- ListGalleries(wdBulletGallery).ListTemplates(1), ContinuePreviousList:= _
- False, ApplyTo:=wdListApplyToSelection, DefaultListBehavior:= _
- wdWord10ListBehavior
- End Sub
复制代码
两段代码的区别是:
1、导入图片的代码:
.NumberFormat = ChrW(61548)
.NumberStyle = wdListNumberStylePictureBullet
ApplyPictureBullet FileName:="D:\1.png"
上面三句及上述代码中最后一句;
2、非导入图片的方式:
.NumberFormat = ChrW(61618)
.NumberStyle = wdListNumberStyleBullet
及对应代码的最后一句。
我反复对比这两段代码的异同,却不知道如何处理了。
感谢老师关注,我第一次没有表达清楚,实在浪费老师的时间,对不起~! |
-
-
|