Dear all,
I am currently working on this code and I need to replace chr(13) with space for the selected text and not for the whole slide. The code below works well with all shapes in active presentation .
The code is as follows :
The suggestions would be welcome to customize this subroutine to run on the selected Text inside a shape.
Regards
I am currently working on this code and I need to replace chr(13) with space for the selected text and not for the whole slide. The code below works well with all shapes in active presentation .
The code is as follows :
Code:
Sub Removepb()
Dim otxR As TextRange
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If Not oshp.Type = msoPlaceholder Then
If oshp.HasTextFrame Then
If oshp.TextFrame.HasText Then
Set otxR = oshp.TextFrame.TextRange
otxR.Text = Replace(otxR.Text, Chr(13), "")
End If
End If
End If
Next oshp
Next osld
End Sub
The suggestions would be welcome to customize this subroutine to run on the selected Text inside a shape.
Regards