Is it possible to insert an sdt after another sdt in an already existing document? for example, if I have logic like the below which is stepping through all of the current document sdt’s
var sdtNodes = target.FirstSection.Body.GetChildNodes(NodeType.StructuredDocumentTag, true);
foreach (StructuredDocumentTag sdt in sdtNodes)
{
//…Some kind of logic to identify the node I want
//-> Insert a new sdt (markup type block)? after the found node
}
I’ve tried sdt.ParentNode.InsertAfter(sdtForTextInsert, sdt)
and I just get an error about “inserting at this location”
Thank you for any help.
Regards,
Mark