Guest User

Untitled

a guest
Apr 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. Sub CreateSlides()
  2.  
  3. Dim OWB As New Excel.Workbook
  4. Set OWB = Excel.Application.Workbooks.Open("C:data.xlsx")
  5. Dim WS As Excel.Worksheet
  6. Set WS = OWB.Worksheets(1)
  7.  
  8. For i = 1 To WS.Range("A1000").End(xlUp).Row
  9.  
  10. ActivePresentation.Slides(1).Copy
  11. ActivePresentation.Slides.Paste (ActivePresentation.Slides.Count + 1)
  12.  
  13. ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(1).TextFrame.TextRange.Text = WS.Cells(i, 1).Value
  14. Next
  15. End Sub
Add Comment
Please, Sign In to add comment