Simpatie.ro - matrimoniale
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:
inna_90 pe Simpatie.ro
Femeie
23 ani
Vrancea
cauta Barbat
30 - 48 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[WORD] Clear All Tab Stops in Active Document [VBA]

Pagini: 1 Moderat de TRaP, TonyTzu
#1
Mrrrr
AdMiN
Postari: 2388
While there is the option: HOME - Paragraph Properties - Tabs - Clear All

you can also use the 1-click VBA alternative:


Sub ParagTabStops_Remove()

With ActiveDocument.Range
    .ParagraphFormat.TabStops.ClearAll
End With

ActiveDocument.DefaultTabStop = CentimetersToPoints(1.27)

End Sub


_______________________________________


 
   
#2
TRaP
Moderator
Postari: 960
If you want to clear the tab stops and add your own, for example at 0,5 cm and at 3,3 cm, just use this:


Sub AddTabStops()
    With ActiveDocument
        Selection.ParagraphFormat.TabStops.ClearAll
        Selection.ParagraphFormat.TabStops.Add Position:=CentimetersToPoints(0.5), _
            Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
        Selection.ParagraphFormat.TabStops.Add Position:=CentimetersToPoints(3.3), _
            Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
    End With
End Sub


 
   
Pagini: 1  
Mergi la