Vba code to replace, position and remove indentation in powerpoint.

shoun2502

New Member
Joined
Nov 14, 2018
Messages
45
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
The code works with the replace , position except with the indentation I am trying to establish


Before text = 0 cm, Special = None, Alignment = Left"




I have established the code below


Code:
Sub changeFont()
For Each aSlide In ActivePresentation.Slides
For Each aShape In aSlide.Shapes
Dim x As Long


If aShape.Type = msoTextBox Then
If aShape.TextFrame.HasText Then
If aShape.TextFrame.TextRange.Font.Name = "Franklin Gothic Demi" Then
If aShape.TextFrame.TextRange.Font.Size = 10 Then
      With aShape
            .TextFrame.TextRange.Font.Size = Replace(aShape.TextFrame.TextRange.Font.Size, 10, 25)
          With aShape
            .TextFrame.TextRange.Ruler
            For x = 1 To .Levels.Count
                .Levels(x).FirstMargin = 0
                .Levels(x).LeftMargin = 0
                Next
            End With
            
            .Top = 23
            .Left = 44
            .Height = 44
        End With
End If
End If
End If


End If
Next
Next
End Sub

I look for suggestions to run with the above subroutine.
Thanks in anticipation
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top