Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Everyone,

In previous version of MS Office Word document, the persistency of an ActiveX control was requested via IPersisStream / IPersistStorage.

Now as XML format style is heavily used, MS Office Word is using that concept in his new document format. The question is how is the convertion applied from the IPersistStream / IPersistStorage compound file way to XML settings.

I have found the following XML set of lines for the ActiveX control properties persistency:

XML
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
   <ax:ocx ax:classid="{978C9E23-D4B0-11CE-BF2D-00AA003F40D0}" ax:persistence="persistPropertyBag"
    xmlns:ax="http://schemas.openxmlformats.org/officeDocument/2006/2/activeX"
    xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
  <ax:ocxPr ax:name="ForeColor" ax:value="0" />
  <ax:ocxPr ax:name="BackColor" ax:value="16777215" />
  <ax:ocxPr ax:name="Caption" ax:value="Name" />
  <ax:ocxPr ax:name="Size" ax:value="2540;635" />
  <ax:ocxPr ax:name="FontName" ax:value="Calibri" />
  <ax:ocxPr ax:name="FontHeight" ax:value="225" />
  <ax:ocxPr ax:name="FontCharSet" ax:value="0" />
  <ax:ocxPr ax:name="FontPitchAndFamily" ax:value="2" />
  </ax:ocx>



Does that mean we have to rely on the type library definition to loop over all public properties and convert them as XML entries [Name = Value] ?

How does MS Office Word generates this kind of xml code set ?
Do they use the loop properties principle or something else ?

Thank you very much in advance.
Best regards.
SuperMiqi
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900