Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Illinois
    Posts
    552
    Thanks
    0
    Thanked 1 Time in 1 Post

    Change textbox depth in ppt (PPT 2003)

    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.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Change textbox depth in ppt (PPT 2003)

    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

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Illinois
    Posts
    552
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Change textbox depth in ppt (PPT 2003)

    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.

  4. #4
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Illinois
    Posts
    552
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Change textbox depth in ppt (PPT 2003)

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

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Change textbox depth in ppt (PPT 2003)

    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.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Change textbox depth in ppt (PPT 2003)

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •