I am having problems to make my MFC ActiveX control work on Word 2007 and
most likely this is a Word 2007 bug.
Inside my control, I use PX_Blob() to serialize data according to this
article:
http://support.microsoft.com/kb/q137333/
This works fine on Word 2003 and earlier versions. It also works fine on
Word 2007 if I save the document as 97-2003 format. But it does not work if
you save the Word document as now docx format.
According to this article, I am able to disassemble the docx file I saved:
http://geeks.netindonesia.net/blogs/ridi/archive/2007/02/03/Let_1920_s-Dissamble-Word-2007-File-Format-and-Generate-Word-File-On-The-Fly.aspx
After disassembling it, I can see a file called 'activeX1.xml', which
contains all properties of my ActiveX control, EXCEPT for the BLOB. Can
somebody
explain why the BLOB is not saved? Is this a bug?
Here is the xml file of my activex control:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ax:ocx ax:classid="{60DD56BF-4096-4C36-9D64-B503B7EFE0AD}"
ax:persistence="persistPropertyBag"
xmlns:ax="http://schemas.microsoft.com/office/2006/activeX"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
<ax:ocxPr ax:name="_Version" ax:value="65536"/>
<ax:ocxPr ax:name="_ExtentX" ax:value="3810"/>
<ax:ocxPr ax:name="_ExtentY" ax:value="635"/>
<ax:ocxPr ax:name="_StockProps" ax:value="20"/>
<ax:ocxPr ax:name="Text" ax:value="c50af60fe9cd4dfdb2e1623f22439b63"/>
<ax:ocxPr ax:name="FieldName" ax:value="c50af60fe9cd4dfdb2e1623f22439b63"/>
<ax:ocxPr ax:name="ImageIndex" ax:value="8"/>
<ax:ocxPr ax:name="FieldTypeID" ax:value="0"/>
<ax:ocxPr ax:name="S0" ax:value="Times Roman"/>
</ax:ocx>
Here are the steps to reproduce the problem:
1. Create a MFC ActiveX control and use PX_Blob() to serialize data.
2. Insert the control on the Word 2007 document.
3. Save the document as .docx - the new word format.
4. Quit Word 2007
5. Open the Word 2007 and open the file you just saved.
6. The PX_Blob() will NOT return the data you just saved.
--
Thanks,
Yang Lu
MCAD, MCP.
--
Thanks,
Yang Lu
MCAD, MCP.