Welcome to MSDN Blogs Sign in | Join | Help

The ActiveX in Office Open XML Compendium - Part 1 Persistence

  Vijayeta Tilak has been posting a lot of info lately on the OpenXMLDeveloper site and posted this about ActiveX in OpenXML.

  Its a good post, but there's a bit more to the story, and I've been meaning to post the details on ActiveX control support in Office Open XML and the changes to controls in Office 2007.  A good place to start is SamRad's posts on the Trust Center in Excel.

Persistence

  Previous versions of Office only supported the following interfaces for ActiveX control persistence (IPersistStorage, IPersistStream, IPersistStreamInit and IPersistPropertyBag for saving to HTML).  In order to store ActiveX control properties as XML, we added support for IPersistPropertyBag for the regular save cases (for controls that support this interface).

If the control doesn't support IPersistPropertyBag, the application will attempt to save the properties using the next interface on its list (see below). (We simply added IPeristPropertyBag to the top of the list from previous versions).

Word and PowerPoint:

  1. IPersistPropertyBag()
  2. IPersistStorage()
  3. IPersistStreamInit()
  4. IPersistStream()

Excel:

  1. IPersistPropertyBag()
  2. IPersistStreamInit()
  3. IPersistStream()
  4. IPersistStorage()

For controls that persist using the IPersistPropertyBag() interface, the control properties are stored in a single xml part with a relationship type of http://schemas.openxmlformats.org/officeDocument/2006/relationships/control and a content type of application/vnd.ms-office.activeX+xml.

Control properties that are stored using one of the other interfaces will be stored in a binary part that is related to the XML part by the following relationship: http://schemas.microsoft.com/office/2006/relationships/activeXControlBinary and a content type of application/vnd.ms-office.activeX.

Of course, the schema is described in the Ecma spec.

Next Post: MetaFiles and disabled controls

- Kevin
Published Tuesday, October 17, 2006 10:54 AM by KevinBoske

Comments

No Comments
New Comments to this post are disabled
 
Page view tracker