Hello,

First post - first question. I hope someone here can help me. I've got a fairly large PowerPoint document, and would like to change all shapes' Text Options to "Do not autofit". The document contains grouped items and normal (not grouped) shapes. I sort of understand how code works, but am by no means a programmer. In the past, I've been able to modify VBA code I found online to suit my needs. This is what I've done so far, but I get error messages when running the script:


Sub ActivePresentation_DoNotAutofit()
    Dim oshp As Shape
    Dim osld As Slide
    Dim L As Long


    For Each osld In ActivePresentation.Slides
    For Each oshp In osld.Shapes


    If oshp.Type = msoGroup Then
        For L = oshp.GroupItems.Count To 1 Step -1
            Call DoNotAutofit(oshp.GroupItems(L))
        Next L
    Else
    Call DoNotAutofit(oshp)
    End If
    Next oshp
    Next osld
End Sub


Sub DoNotAutofit(oshp As Shape)
   oshp.TextFrame2.Autosize = msoAutoSizeNone
End Sub
There's probably more elegant solutions for this, for example to implement to 2nd part into the main script. But like this, I can easily modify the script for other things. (And it makes things more simple when I look at the code again in a few months).
Can someone please help me?

Many thanks!
Peter