Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Nou pe simpatie: Profil misha_light
 | Femeie 25 ani Bucuresti cauta Barbat 26 - 47 ani |
|
|
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
|
| #1 |
TRaPModerator
Postari: 960
|
|
By default, with VBA you add line bullets using the default Bullets and Numbering font which is Symbol. If your document has Times New Roman or Arial or simply you want to insert a shorter line, use the code below. Note: it also adds a tab stop to 1 cm from left margin and the line is situated at 0,5 cm from left.
Sub AddLineBulletList()
Dim Template As word.ListTemplate Set Template = word.Application.ListGalleries(wdBulletGallery).ListTemplates(1) With Template.ListLevels(1) .NumberFormat = "-" .Font.Name = "Arial" .TrailingCharacter = wdTrailingTab .NumberStyle = wdListNumberStyleBullet .NumberPosition = CentimetersToPoints(0.63) .Alignment = wdListLevelAlignLeft .TextPosition = CentimetersToPoints(1.27) .TabPosition = wdUndefined .ResetOnHigher = 0 .StartAt = 1 .LinkedStyle = "" End With
Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=Template With Selection.ParagraphFormat .LeftIndent = CentimetersToPoints(0) .RightIndent = CentimetersToPoints(0) .SpaceBefore = 0 .SpaceBeforeAuto = False .SpaceAfter = 0 .SpaceAfterAuto = False .LineSpacingRule = wdLineSpaceSingle .Alignment = wdAlignParagraphLeft .WidowControl = True .KeepWithNext = False .KeepTogether = False .PageBreakBefore = False .NoLineNumber = False .Hyphenation = True .FirstLineIndent = CentimetersToPoints(0.5) .OutlineLevel = wdOutlineLevelBodyText .CharacterUnitLeftIndent = 0 .CharacterUnitRightIndent = 0 .CharacterUnitFirstLineIndent = 0 .LineUnitBefore = 0 .LineUnitAfter = 0 .MirrorIndents = False .TextboxTightWrap = wdTightNone .CollapsedByDefault = False .Alignment = wdAlignParagraphJustify .TabStops.Add _ Position:=CentimetersToPoints(1), _ Alignment:=wdAlignTabLeft, _ Leader:=wdTabLeaderSpaces End With
End Sub
|
|
|
| |
|