VSTO Support for the WordML File Format


VSTO has several features that support the WordML file format. Although you cannot create a new VSTO Word project in the WordML format, you can take a Word document that has been customized in VSTO and save it as WordML. Because WordML preserves all the features of the Word document, the document continues to work, and the VSTO customization will run even when saved in WordML format.

VSTO's ServerDocument object can open a file in the WordML file format without starting Word on the server and manipulate the cached data and application manifest inside the Word document. For more information on ServerDocument, see Chapter 18, "Server Data Scenarios," and Chapter 20, "Deployment."

VSTO also supports an easy way of attaching a VSTO customization to an uncustomized WordML document. If you add a document property to the Word document called _AssemblyName and set it to *, and add a second property to the Word document called _AssemblyLocation and set it to the URL to a VSTO deploy manifest (as described in Chapter 20), Word will attach the customization specified in the deploy manifest when the document is opened on the client. This feature was added because it makes it much easier to attach a VSTO customization when using a WordML document or an XSLT transformation that transforms XML data to a WordML-format document. When using this feature, make sure that you start with a clean document that does not have a VSTO customization already associated with it. A document that is customized with a VSTO customization will already have its _AssemblyName and _AssemblyLocation properties set, and it will have a hidden ActiveX control embedded in it that contains the data island. The whole point of using this feature is to not have to deal with the embedded ActiveX control in the document, because it becomes unwieldy when generating WordML or writing an XSLT transform.




Visual Studio Tools for Office(c) Using Visual Basic 2005 with Excel, Word, Outlook, and InfoPath
Visual Studio Tools for Office: Using Visual Basic 2005 with Excel, Word, Outlook, and InfoPath
ISBN: 0321411757
EAN: 2147483647
Year: N/A
Pages: 221

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net