Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-19-2023, 07:55 PM
excelledsoftware excelledsoftware is offline VBA needed for changing all text boxes in presentation Windows 10 VBA needed for changing all text boxes in presentation Office 2007
IT Specialist
 
Join Date: Jan 2012
Location: Utah
Posts: 455
excelledsoftware will become famous soon enough
Default

You have a great start. Now you need to go through each shape in each slide in the presentation. There are a few more objects to do this.
Code:
Sub Macro2(control as IRibbonControl)
  Dim oShp As Shape, oSld As Slide, pst As Presentation, pass As Integer
  'On Error Resume Next dont like these, I suggest not to use it without handling

  'set the variables
  Set pst = ActivePresentation
  
  'start the loops
  For Each oSld In pst.Slides
    For Each oShp In oSld.Shapes
      pass = 1
      'check if we want to skip the shape
      If oShp.HasTextFrame = msoFalse Then pass = 0
      'we can add as many as we want here in case there is more criteria needed
      If pass = 1 Then
        With oShp
          .LockAspectRatio = False
          .Left = 34.5
          .Top = 84.5
        End With
      End If
    Next oShp
  Next oSld
End Sub
If this tries to move charts or other items we will just check for oShp.type and make sure its the type that you want.
Let me know if you have any other questions.

Thanks
Reply With Quote
 

Tags
select all, text boxes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed in changing text & line colour please dazzystar Word 2 05-27-2021 09:39 AM
VBA needed for changing all text boxes in presentation Changing the names of text boxes catflap Word 20 05-11-2018 08:57 AM
Changing the font colour in all text boxes marqives Word VBA 1 11-25-2014 06:05 PM
VBA needed for changing all text boxes in presentation Changing the placeholder text for drop down boxes DeadBatteries Word 1 08-24-2012 09:09 AM
Quick change for all text boxes in a presentation tmlander PowerPoint 1 03-09-2012 01:20 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:05 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft