For PPT format we extract text objects on the slide as such:
foreach (Aspose.Slides.Shape s in slide.Shapes)
{
if (s.TextFrame != null)
{
string msg = s.TextFrame.Text;
if (!String.IsNullOrEmpty(msg))
{
txtContent.Append(msg);
txtContent.Append(" “);
}
}
}
and we extract the present notes like this:
if (slide.Notes != null && !String.IsNullOrEmpty(slide.Notes.Text))
{
txtContent.Append(slide.Notes.Text);
txtContent.Append(” ");
}
The APIs seem to have changed for PPTX where we can no longer do this. Could you please advise?
Regards,
Stefan
Hi Stefan,
Here is an example for pptx.
foreach (ShapeEx shape in shapes)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
{
if (shape is AutoShapeEx)
{
AutoShapeEx autoShp = (AutoShapeEx)shape;
if (autoShp.TextFrame != null)
Response.Write(autoShp.TextFrame.Text);
}
else if (shape is TableEx)
{
TableEx table = (TableEx) shape;
foreach (RowEx row in table.Rows)
{
foreach (CellEx cell in row)
{
if (cell.TextFrame != null)
Response.Write(cell.TextFrame.Text);
}
}
}
}
Could you kindly supply this code for VB?
Hi Eric,