when i assign a special style to any text in my word document, the
tabstops are removed. i just want to change the corresponding
character style, not my tabstops.
thanks, matthias
Sorry.
Hi Matthias,
With a little VBA, you can write a macro that applies some style to a
paragraph without changing the tab stops:
Call ApplyStyleOldTabs("Heading 1")
Sub ApplyStyleOldTabs(StyleName As String)
Dim myPF As ParagraphFormat
Dim myTab As TabStop
Set myPF = Selection.ParagraphFormat.Duplicate
' Apply style
Selection.Style = ActiveDocument.Styles(StyleName)
' Re-set TabStops
Selection.ParagraphFormat.TabStops.ClearAll
For Each myTab In myPF.TabStops
Selection.ParagraphFormat.TabStops.Add _
myTab.Position, _
myTab.Alignment, _
myTab.Leader
Next myTab
End Sub