View Single Post
 
Old 07-13-2023, 01:59 PM
msnyder701 msnyder701 is offline Windows 10 Office 2021
Novice
 
Join Date: Jul 2023
Posts: 2
msnyder701 is on a distinguished road
Default VBA needed for changing all text boxes in presentation

I have this code for changing the location of a single text box:
Sub Macro2(control As IRibbonControl)
Dim oShp As Shape
On Error Resume Next

Set oShp = ActiveWindow.Selection.ShapeRange(1)

With oShp
.LockAspectRatio = False
.Left = 34.5
.Top = 84.5
End With

End Sub

What I want to do is to do this for all text boxes that contain text (i.e., not shapes that are charts, pictures, etc.) in the entire presentation. Can someone show me how to do this? The codes that I've tried to write just don't work. Thanks!
Reply With Quote