Results 1 to 2 of 2

Thread: Entering Text In A Shape In PowerPoint PPT Slide Using Excel VBA

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Posts
    9
    Rep Power
    0

    Lightbulb Entering Text In A Shape In PowerPoint PPT Slide Using Excel VBA

    Hi,

    I have an existing PPT with many shapes and different text written on it. I need to remove the existing text inside the shape and enter new text in it. Please help me to solve the problem using excel vba.

    Regards,

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    So this is how the hierarchy of the text property of a shape can be branched. You could substitute it with your actual variables for the application or the presentation or the slide.

    So for example, if it were a variable with the name objPPT where you've got your application object, you could use
    Code:
    objPPT.Presentations(1).Slides(1).Shapes(1).TextFrame.TextRange.Characters.Text = "New Text"
    or if you have objSlide as your slide object, then

    Code:
    objSlides.Shapes(1).TextFrame.TextRange.Characters.Text = "New Text"
    Depends on how your code is written. But as you can see, the hierarchy of objects is the same.
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

Similar Threads

  1. Copy/Paste Excel Range/Chart into Powerpoint VBA
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 1
    Last Post: 03-13-2014, 02:59 PM
  2. Embed an Excel Chart into PowerPoint - VBA
    By Junoon in forum Excel Help
    Replies: 3
    Last Post: 07-18-2013, 12:20 AM
  3. Replies: 1
    Last Post: 07-10-2013, 11:38 AM
  4. Add VBA Reference From Another Application Excel To PowerPoint
    By ds1001 in forum Rajan Verma's Corner
    Replies: 1
    Last Post: 06-02-2013, 02:43 PM
  5. How to extract all text from a ppt file
    By vsrawat in forum Powerpoint Help
    Replies: 2
    Last Post: 09-25-2012, 10:23 PM

Posting Permissions

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