PowerPoint to Excel

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?
 
J

Joel

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.
 
M

manzoor

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.
 
J

Joel

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
 
M

manzoor

Thanks for getting me startin. Sorry I forgot to tell that I'm Using VSTO C#
so where may I find the GetObject function?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top