wordDoc As WordprocessingDocument = WordprocessingDocument.Open(filename, True)
This works when the doc is closed. How do I initialize WordprocessingDocument object with a document that is already opened?
Is OpenXML SDK 2.0 recommended to be used on the client side and in combination with VSTO?
We have client side Excel addins in VBA and VSTO and would like to use OpenXML SDK 2.0 to replace our VBA and improve processing speed.
You need to take a different approach. The approach that you take is that you create a VSTO application, and then at the point where you need to create content with better performance, you grab the Open XML markup for the entire document, modify it as necessary, and the put the Open XML markup back, which then updates the document.
See Using Open XML to Improve Automation Performance in Word 2010 for Large Amounts of Data for detailed explanation and an example.
Eric, thank you so much. I have been reading many of your articles lately learning about OpenXML and Linq to XML.
Is there an equivalent of Range.GetPackageStreamFromRange() for Excel?