So, I'm using a macro to align text boxes across multiple slides (one slide at a time, select text box to align with macro, click the assigned macro button, rinse and repeat).
Most of the time it works absolutely fine. But then on random slides (I can't work out the pattern), the paragraph spacing (.SpaceAfter) goes wrong. Instead of, in this particular example, a space of 3 pts between paragraphs, it will set it to 28.8 pts between paragraphs.
For the life of me, I cannot work out why this is happening. It would be less confusing if it happened all the time, but on most slides it works fine!
Any help is appreciated. Current version of the code I'm using is below.
Sub TextBoxAlign()If ActiveWindow.Selection.Type <> ppSelectionShapes Then Exit Sub
With ActiveWindow.Selection.ShapeRange(1)
.LockAspectRatio = False
.Height = cm2Points(0.6)
.Width = cm2Points(25.24)
.Left = cm2Points(0)
.Top = cm2Points(13.69)
With .TextFrame
.WordWrap = True
.VerticalAnchor = msoAnchorBottom
.AutoSize = ppAutoSizeNone
With .TextRange
With .Font
.Size = 8
.Name = "Arial(Body)"
.Bold = False
.Color.RGB = RGB(92, 92, 92)
End With
With .ParagraphFormat
.SpaceBefore = 0
.SpaceAfter = 3
.Alignment = ppAlignLeft
End With
End With
End With
End With
End Sub
Function cm2Points(inVal As Single)
cm2Points = inVal * 28.346
End Function
(I take no credit for any of this code, as it has been cobbled together from the hard work of others; I think it was originally John Wilson who developed the original code).