Monday, March 5, 2012

Starting Open Xml for Microsoft Office

Previously I have work with Aspose slides and now I’m trying to work with this one.First need to download OpenXml SDK for that used following link.This link also contains Open Xml tools setup that includes help documents etc..  image

Download Open Xml SDK 2.0 

Starting Steps

  1. Install OpenXml SDK (and tools )
  2. Open Visual Studio (currently I’m using visual studio 2010 with c#)  create new windows form project
  3. Reference DocumentFormat.OpenXml dll which is in installed path (Projects->Add Reference->browse to dll)
  4. Use following name spaces image
  5. to create new presentation image
  6. to open exist presentation image

Errors Occurred :

The type 'System.IO.Packaging.Package' is defined in an assembly that is not referenced. You must add a reference to assembly 'WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

this error can be solved adding reference to windowsBase in .Net Tab.