Insert OpenXmlElement after word bookmark in Open XML SDK
问题 I was able to access a bookmark in my word document using this code: var res = from bm in mainPart.Document.Body.Descendants<BookmarkStart>() where bm.Name == "BookmarkName" select bm; Now I want to insert a paragraph and a table after this bookmark. How do I do that? (example code would be appreciated) 回答1: Code Once you have the bookmark you can access its parent element and add the other items after it. using (WordprocessingDocument document = WordprocessingDocument.Open(@"C:\Path\filename