View Full Version : Settings for Tabstopps
MarcoK
08-22-2018, 01:07 AM
Hello together,
I'm new in this Forum and I have one question concerning Tabstopps.
I have to adjust the Settings of Tabstopps .
My macro sets at one Point a different Page Setup what causes a proportional adjustment of the Tabstopps.
Like:
Before Tabstop = 1.25cm
After Tabstop = 1.04cm
I want to set the tabstop per macro again to 1.25cm.
Thanks for you help in advance
John Wilson
08-26-2018, 12:00 AM
Not clear what you are asking
Default tabs or tabs added manually?
Version of office?
What code did you use?
Assuming you mean default tabs this might work
Sub tabss()
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.HasTextFrame Then
oshp.TextFrame.Ruler.TabStops.DefaultSpacing = cm2Points(1.25)
End If
Next
Next
End Sub
Function cm2Points(inVal As Single)
cm2Points = inVal * 28.346
End Function
MarcoK
08-26-2018, 11:42 PM
Hello John,
it works but can I also use it for the SlideMaster?
Thanks
John Wilson
08-26-2018, 11:56 PM
Maybe
Sub tabss()
Dim ocust As CustomLayout
Dim odes As Design
Dim oshp As Shape
For Each odes In ActivePresentation.Designs
For Each oshp In odes.SlideMaster.Shapes
If oshp.HasTextFrame Then
oshp.TextFrame.Ruler.TabStops.DefaultSpacing = cm2Points(1.25)
End If
Next
For Each ocust In odes.SlideMaster.CustomLayouts
For Each oshp In ocust.Shapes
If oshp.HasTextFrame Then
oshp.TextFrame.Ruler.TabStops.DefaultSpacing = cm2Points(1.25)
End If
Next
Next
Next
End Sub
Function cm2Points(inVal As Single)
cm2Points = inVal * 28.346
End Function
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.