PowerPoint to Excel

  • Thread starter Thread starter manzoor
  • Start date Start date
M

manzoor

Hi, I want to extract data from PowerPoint slides and then paste them into
Excel workbook, where each slide in PowerPoint corresponds to a sheet in
Excel workbook and vice-versa (from Excel to PowerPoint).

How do I do this? I extracted the data PowerPoint but now how do I make it
send to data to Excel? What options/possibilities do I have?
 
You can only import data if the power point slide is NOT a picture. Is the
power point slide a table or is it ActiveX object like a imbedded word
document? Need more information to give you a good answer. Usually Power
Point slide are the the real source of the data. Usally poeple get the slide
from other sources and paste them inoto the slide presentation. It is
probably better to start with the real source.
 
Well actually its a table and text shapes

Joel said:
You can only import data if the power point slide is NOT a picture. Is the
power point slide a table or is it ActiveX object like a imbedded word
document? Need more information to give you a good answer. Usually Power
Point slide are the the real source of the data. Usally poeple get the slide
from other sources and paste them inoto the slide presentation. It is
probably better to start with the real source.
 
See if this helps.

Sub GetSlides()

FName = "c:\temp\test.ppt"
Set obj = GetObject(FName)
obj.Application.Visible = True

Set ExcelSht = ThisWorkbook.Sheets(1)
NewRow = 1

For Each slide In obj.Slides
With slide.Shapes
For i = 1 To .Count
If .Item(i).HasTable Then
Set MyTable = .Item(i).Table
For Each MyRow In MyTable.Rows
Col = 1
For Each MyCol In MyRow.Cells
With ExcelSht
Set DataCell = MyCol.Shape.TextFrame.TextRange
.Cells(NewRow, Col) = DataCell.Text
Col = Col + 1
End With
Next MyCol
NewRow = NewRow + 1
Next MyRow
End If
Next
End With
Next slide

obj.Close
Set obj = Nothing
End Sub
 
Thanks for getting me startin. Sorry I forgot to tell that I'm Using VSTO C#
so where may I find the GetObject function?
 
Back
Top