• Change textbox depth in ppt (PPT 2003)

    Author
    Topic
    #427096

    How can I write a macro to search through all my slides (100 of them) and change the textbox at the bottom which is 4.75″ high to just .75″ high? thank you for the help.

    Viewing 0 reply threads
    Author
    Replies
    • #988712

      Try this:

      Sub SetHeights()
      Dim sld As Slide
      Dim shp As Shape
      For Each sld In ActivePresentation.Slides
      For Each shp In sld.Shapes
      If shp.Height = 4.75 * 72 Then
      shp.Height = 0.75 * 72
      End If
      Next shp
      Next sld
      End Sub

      • #988716

        thank you very much. Seems like it should work but it’s not finding them. The textbox is 4.45″ height with a width of 7.11″. I changed the code to 4.45 instead of 4.75 but it still doesn’t find them.

        • #988717

          i changed to
          shp.height = 320 and shp.height = 54 and now it works. go figure

          • #988719

            Converting between inches and points necessarily involves rounding, and that’s what causes the difference.

        • #988718

          Perhaps the height is slightly off. Try this variation:

          If Abs(shp.Height – 4.45 * 72) < 2 Then

          This should find all text boxes with a height within 2 points of 4.45 inches (1 point = 1/72"). You can experiment with slightly larger or smaller values than 2.

    Viewing 0 reply threads
    Reply To: Change textbox depth in ppt (PPT 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: