Results 1 to 3 of 3

Thread: Copying Text from One Shape on one slide and Pasting it into another shape on another

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Copying Text from One Shape on one slide and Pasting it into another shape on another

    Hello! I'm really hoping you all can help me out. I'm at a complete loss, and all of the current content I looked at didn't help much. I (obviously) am very new to this, and have hit a bit of a snag.

    In the code below, I am trying to take the text from "dsscust1stname" on the "Infokey" slide and paste the text into the "TextBox3" on the "Coverletter" slide however it breaks right at the end of the code, giving a compile error: method or data member not found. Help???

    Sub ReplaceALL()
    Dim objPresentation As Presentation
    Dim objSlide1 As Slide
    Dim objTextBox1 As Shape
    Dim objSlideA As Slide
    Dim objTextBoxA As Shape
    Set objPresentation = ActivePresentation
    Set objSlide1 = objPresentation.Slides("Coverletter")
    Set objTextBox1 = objSlide1.Shapes.Item("TextBox3")
    Set objSlideA = objPresentation.Slides("Infokey")
    Set objTextBoxA = objSlideA.Shapes.Item("dsscust1stname")
    objTextBox1.TextFrame.TextRange.Text = objTextBoxA.TextFrame.Value
    End Sub
    Last edited by Aussiebear; 12-28-2022 at 06:52 PM. Reason: Added code tags to supplied code

Tags for this Thread

Posting Permissions

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