When i add this code to my project, i do not get to read any of the portions that come from the paragraphs on the TextFrame. My exact code is below:
foreach(Shape shape in slide1.Shapes)
{
string pastpptfield = “”;
string workingwith = “”;
if(shape is TextFrame)
{
// the code never enters this structure
foreach(Paragraph para in shape.TextFrame.Paragraphs)
{
and the code goes on. Can anyone please tell me why the shape is never TextFrame? I did some checking and it turns out all the texboxes i want to edit show up as shape “Rectangle” instead of TextFrame.
I have this program go through each slide and 1 - iterate through all the shapes, and 2 - iterate through all the placeholders. Looking at your object model for Aspose.PowerPoint, i see that TextFrame has the same properties as TextHolders. So, the code should be the same to read from both of those objects, correct?
Anyway below is the code i use to go through each portion of a placeholder: The TextFrames one is identical, except for the for loop in the beginning, which is replaced by what i wrote above with the whole “foreach (shape shape in slide1.shapes).