Wednesday, November 29, 2006

Open XML File Format Code Snippets for Visual Studio 2005 (Office 2007 NOT required)

Microsoft Downloads - 2007 Office System Sample: Open XML File Format Code Snippets for Visual Studio 2005

"This download includes snippets for use when customizing Microsoft Office Excel 2007, Microsoft Office PowerPoint 2007, and Microsoft Office Word 2007. Download and install these snippets to your Visual Studio code snippet folder and use them with the Visual Studio Code Snippets Manager.

Example snippets include reordering slides, removing comments and hidden text, retrieving properties, inserting and deleting parts programmatically, and more."

What may not be clear (it wasn't to me until I read Updated Open XML code snippets for Visual Studio) is that these snippets are not really Office 2007 snippets, but Open XML snippets.

Meaning all you need is .Net 3.0 installed. You don't need Office 2007...The snippets I've checked all seem to reference windowsbase.dll and use the System.IO.Packaging namespace (in addition to other namespaces of course).

There are 41 snippets (for both VB.Net and C#) in this package, 17 Excel (.xlsx), 15 Word (.docx), 8 PowerPoint (.pptx) and 1 general. They appear to be mostly "tweak existing files" in nature. WDRemoveHiddenText, XLInsertString, PPTModifySlideTitle, delete stuff, remove stuff, get info, etc.

Related Past Post XRef:
Open XML/Word 2007 - Content Control Toolkit
MS Office Compatibility Pack for Office 2007 Files (Open, Edit, Save Office 2007 files in Office 2000,XP, 2003...)

No comments: