To do this we have a shape within which is the Tag #PHOTO#.
I can find the text #PHOTO# and replace it with an image from the DB. However I need to be able to set the size to the shape and need to identify the "owning" shape.
At the moment I'm relying on
- Code: Select all
foreach(Paragraph para in section.Paragraphs)
{
foreach (DocumentObject obj in para.ChildObjects)
{
if (obj is ShapeObject)
{
height = (obj as ShapeObject).Height;
width = (obj as ShapeObject).Width;
}
}
}
and hoping the shape is the last one found, but I would prefer to check and the Shape has the Tag I´m looking for.
Is there a way of doing this?