+ Reply to Thread
Results 1 to 8 of 8

Find and replace words in PowerPoint using a Excel VBA macro

  1. #1
    Registered User
    Join Date
    10-02-2018
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    5

    Find and replace words in PowerPoint using a Excel VBA macro

    Hi everybody,

    I hope there is someone who can help me with the following:
    My goal is to have an Excel macro where i can put words in Column A that have to be changed in my Powerpoint presentation into the words that are in Column B.

    Here is a PowerPoint macro that allready finds and replaces words in PowerPoint, but it's not connected to Excel:
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 10-02-2018 at 07:54 PM. Reason: Added Code Tags

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Find and replace words in PowerPoint using a Excel VBA macro

    Hi
    try this
    you will need to enter the range with values to be replaces and replace them with as the range Searchrange (I used A2:B4)
    to run powerpoint macros from excel you must select the powerpoint object reference library in the VBA area under tools > references


    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-02-2018
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    5

    Re: Find and replace words in PowerPoint using a Excel VBA macro

    Hi NickyC,

    Thank you for your reaction.

    I tried it, but got a Run time error '-2147024809 (80070057)' The specified value is out of range on:

    If PPShape.HasTextFrame And PPShape.TextFrame.TextRange.Text <> "" Then

    I hope you can help me again!

  4. #4
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Find and replace words in PowerPoint using a Excel VBA macro

    Hi that could be because some of the shapes in the powerpoint are protected, or are of a format that does not accept text eg pictures.

    try this variation - it worked for me when I added in some pictures that triggered the same error message with the code above.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-02-2018
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    5

    Re: Find and replace words in PowerPoint using a Excel VBA macro

    Hi NickyC,

    Thank you so much!
    You've helped me a lot!

  6. #6
    Registered User
    Join Date
    10-02-2018
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    5

    Re: Find and replace words in PowerPoint using a Excel VBA macro

    Hi NickyC,

    Do you know if it's also possible to replace to words that are in a table?

    Kind regards,

    Rogier

  7. #7
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Find and replace words in PowerPoint using a Excel VBA macro

    Hi
    this version should replace text in tables as well as shapes.
    Sorry, it's rather clunky - one of the forum gurus might offer you a shorter and more elegant alternative

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    10-02-2018
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    5

    Re: Find and replace words in PowerPoint using a Excel VBA macro

    Hi NickyC,

    Thank you very much again!
    You've helped me a lot!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] macro find and replace in a specific column specific words to an abreviation
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-19-2018, 06:05 AM
  2. Replies: 3
    Last Post: 11-25-2014, 06:08 AM
  3. excel macro to find and replace particular words in all excel files in a folder
    By genetist in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-14-2014, 08:59 PM
  4. Highlight certain words in Word document after running find-and-replace from Excel
    By EnterTheSerpent in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2012, 02:27 PM
  5. Replies: 2
    Last Post: 10-11-2012, 01:52 PM
  6. Replies: 4
    Last Post: 04-27-2012, 06:38 AM
  7. Find & Replace Powerpoint Text from Excel
    By lt0218 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2011, 07:56 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1