none
Move position of a textbox within VBA for Powerpoint Application RRS feed

  • Question

  • I am attempting to paste a textbox in a slide which works but puts it in the middle of the slide (position wise). I want to alter the position so I can move it to the location I want. How do I do that? Thanks

    Set ppApp = CreateObject("Powerpoint.application")
    
    Range("C1").Select
    Selection.Copy
    
    ppApp.ActiveWindow.View.Paste

    Monday, September 17, 2018 8:23 PM

All replies

  • this code creates a new ppt add the content of excel range("c1") and set positions to .top=1 and .left=1 ( left top corner of the presentation)

    Sub helpforppt()
    Dim pp As PowerPoint.Application
        Dim PPPres As PowerPoint.Presentation
    Range("C1").Select
    Selection.Copy
      Set pp = New PowerPoint.Application
        Set PPPres = pp.Presentations.Add
        pp.Visible = True
        Set PPPres = pp.ActivePresentation
        Set PPSlide = PPPres.Slides.Add(Slidecount + 1, ppLayoutText)
    pp.ActivePresentation.Slides(1).Shapes.Paste
    pp.ActivePresentation.Slides(1).Shapes(3).Top = 1 
    pp.ActivePresentation.Slides(1).Shapes(3).Left = 1

    End Sub

    Thursday, November 22, 2018 5:36 PM