How can we get the text also from a container in a visio file. With the following code only text from shapes will be extracted (the text “Container” is missing):
foreach (Diagram.Page page in diagram.Pages)
{
foreach (Diagram.Shape shape in page.Shapes)
{
FormatTxtCollection collection = shape.Text.Value;
foreach (object text in collection)
{
if (text is Txt)
{
plainText.Append((text as Txt).Value);
}
}
}
TestContainer.zip (23.1 KB)
Thanks a lot.