Sometimes you need to create a list of all parts in a package so that you can write some generalized code to deal with the parts. This post presents a bit of code that creates a list (List<OpenXmlPart>) of all parts in a package. Note that the parts in a package don’t form a tree – they form a graph. Any part can potentially have a relationship to any other part, which in turn can potentially have a relationship back to the first part. So the recursive code has to look and see if the part already
Read More...