2011-10-18 26 views

回答

4

爲了搶在WordProcessingDocument你可以使用LINQ遍歷身體的所有後代的所有形狀:

using (WordprocessingDocument wordDoc = WordprocessingDocument.Open(stream, true)) 
{ 
    IEnumerable<DocumentFormat.OpenXml.Vml.Shape> shapes = wordDoc.MainDocumentPart.Document.Body.Descendants<DocumentFormat.OpenXml.Vml.Shape>(); 
} 
相關問題