Share via

Find & Replace in Powerpoint

Anonymous
2023-06-03T15:10:22+00:00

I have 27 different powerpoints, representing 27 chapters. Within each I have similar text that is below:

The EMS System (5 of 15)

Note there are 15 slides pertaining to The EMS System and this is on slide 5. I want to delete any and all occurrences of the "(# of #)" that appear on any slide, usually the title section on the slide. I have tried the following to no avail: (*), <(*)>.

What is the correct format to remove these references?

Thanks,

Les

***moved from Microsoft 365 and Office/PowerPoint/For home/Windows***

Microsoft 365 and Office | PowerPoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
  1. Anonymous
    2023-06-04T13:08:09+00:00

    I don't think the version will make any difference. I don't believe that search and replace with wildcards works in any version of PowerPoint.

    In Word for example you can use a regx expression but not in PPT unless you do it in code.

    Do you know (or can research) how to use basic vba code?

    If so this MIGHT work but be sure to use a copy of your work.

    Sub use_regex()
    
    Dim regX As Object
    
    Dim osld As Slide
    
    Dim oshp As Shape
    
    Dim strInput As String
    
    Dim b_found As Boolean
    
    Set regX = CreateObject("vbscript.regexp")
    
    With regX
    
    .Global = True
    
    .Pattern = "\(\s?\d+ of \d+\s?\)"
    
    End With
    
    For Each osld In ActivePresentation.Slides
    
    For Each oshp In osld.Shapes
    
    If oshp.HasTextFrame Then
    
    If oshp.TextFrame.HasText Then
    
    strInput = oshp.TextFrame.TextRange.Text
    
    b_found = regX.Test(strInput)
    
    If b_found = True Then
    
      strInput = regX.Replace(strInput, "")
    
      oshp.TextFrame.TextRange = strInput
    
    End If
    
    End If
    
    End If
    
    Next oshp
    
    Next osld
    
    Set regX = Nothing
    
    End Sub
    
    3 people found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-06-20T18:40:05+00:00

    Thank you! Works great!!

    0 comments No comments
  2. Anonymous
    2023-06-07T05:35:44+00:00

    Hi WLMPilot

    Thank you for getting back and for providing that information.

    Since you have an enterprise version of Microsoft 365, I will move this thread to the business category. In this way, the experts who support Office products for business will be able to provide more information on how to resolve the issue. As much as I'd love to help, it's beyond my expertise as I've only been trained on personal accounts/licenses. We want you to get the answers you need to solve your problems. Please wait for the next expert to answer your question.

    You may also consider the answer provided by John SR Wilson.

    We appreciate your understanding.

    Sincerely


    ReynaldoB

    Microsoft Community Forum Moderator

    0 comments No comments
  3. Anonymous
    2023-06-04T11:45:15+00:00

    Information requested about version:

    This is the first time I have tried this specific Find/Replace. I am editing a 2nd file, Chapter 2, and get the same issue. Trying to delete all occurrences of any text (highlighted) that gives a count of slides in a particular group, i.e. Legal Duties.

    0 comments No comments
  4. Anonymous
    2023-06-04T01:33:28+00:00

    Hi WLMPilot

    Thank you for posting in the Microsoft Community forum. I hope you are doing well.

    I understand that you have concern about the find & replace on PowerPoint wherein you wanted to delete the occurrences that appear on the slide. Let's work together to find the best solution to this problem.

    I would like to ask you some questions to better understand the problem.

    To further assist you, I recommend that you check this article for more information how you can perform the find & replace on PowerPoint. - **** Find and replace text - Microsoft Support

    I look forward to your reply.

    Sincerely


    ReynaldoB

    Microsoft Community Forum Moderator

    0 comments No comments