Export Each Excel Row Text - to PPT
Good Morning folks and community :)
I am trying to export each Row of my excel file to PPT.
It has my descriptions of various technical bits and bobs, that needs to be presenter friendly.
Now I have got a head start thanks to Mr Tolley here.
http://www.craig-tolley.co.uk/2011/0...xcel-workbook/
Code:
Sub CreateSlides()
Found on Mr Tolley site
'Open the Excel workbook. Change the filename here.
Dim OWB As New Excel.Workbook
Set OWB = Excel.Application.Workbooks.Open("C:\Users\DJ-PC\PartDescriptions.xlsm")
'Grab the first Worksheet in the Workbook
Dim WS As Excel.Worksheet
Set WS = OWB.Worksheets(1)
'Loop through each used row in Column A
For i = 1 To WS.Range("A65536").End(xlUp).Row
'Copy the first slide and paste at the end of the presentation
ActivePresentation.Slides(1).Copy
ActivePresentation.Slides.Paste (ActivePresentation.Slides.Count + 1)
'Change the text of the first text box on the slide.
ActivePresentation.Slides(ActivePresentation.Slides.Count).Shapes(1).TextFrame.TextRange.Text = WS.Cells(i, 1).Value
Next
End Sub
I spent the whole day with various errors and what nots , so I overcame them, but I'm still not sure what to do - it runs - but no will it copy my row from excel into the power point.:igiveup:. I don't know why its playing so mean.
So to make it simple to understand
I have 2 Columns in Excel
Column A Part No - Column B - Description
PN384743 - This part belongs to the group TS234, Component CV2837 is required to .......etc
So each Row - would be a slide.
I would like to export each row into Excel as Text.
If any pro expert coder would not mind lending me their hand and helping me to solve this difficult case - I would be grateful very much
I would be really appreciative, as its not easy this coding - I can tell you:old:
thank you very much folks for your help, your time is valued. :grinhalo:
DJ