ActiveX control on Word 2007 problem.

Y

Yang Lu

I am having problems to make my MFC ActiveX control work on Word 2007.

Inside my control, I use PX_Blob() to serialize data according to this
article:
http://msdn2.microsoft.com/en-us/library/xxf9wx2c(VS.71).aspx

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.

I found PX_Long() and PX_String() work fine in the above senario. Also if I
save the file as Word 2003 format (.doc) from Word 2007 the PX_Blob() works
fine too.

I also tested this PX_Blob() issue on Word 2000, 2002 and 2003. They all
work fine.

Looks like this problem only happens to Word 2007 and .docx format.
 
Y

Yang Lu

I got some result of this problem. Hope someone from Microsoft can confirm
this is a bug.

According to this article, I am able to disassemble the docx file:
http://geeks.netindonesia.net/blogs...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 the BLOB. Can somebody
explain to me why the BLOB is not saved? Here is the xml file of my activex
control:


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ax:eek:cx 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:eek:cxPr ax:name="_Version" ax:value="65536"/>
<ax:eek:cxPr ax:name="_ExtentX" ax:value="3810"/>
<ax:eek:cxPr ax:name="_ExtentY" ax:value="635"/>
<ax:eek:cxPr ax:name="_StockProps" ax:value="20"/>
<ax:eek:cxPr ax:name="Text" ax:value="c50af60fe9cd4dfdb2e1623f22439b63"/>
<ax:eek:cxPr ax:name="FieldName" ax:value="c50af60fe9cd4dfdb2e1623f22439b63"/>
<ax:eek:cxPr ax:name="ImageIndex" ax:value="8"/>
<ax:eek:cxPr ax:name="FieldTypeID" ax:value="0"/>
<ax:eek:cxPr ax:name="S0" ax:value="Times Roman"/>
</ax:eek:cx>
 
B

Bob Buckland ?:-\)

Hi Yang Lu,

You may want to also post this in either the Office XML discussion group, or using the link below the OfficeDev group.

=============
I got some result of this problem. Hope someone from Microsoft can confirm
this is a bug.

According to this article, I am able to disassemble the docx file:
http://geeks.netindonesia.net/blogs...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 the BLOB. Can somebody
explain to me why the BLOB is not saved?>> [snip]
--
Please let us know if this has helped,

Bob Buckland ?:)
MS Office System Products MVP

LINKS
A. Specific newsgroup/discussion group mentioned in this message:
news://msnews.microsoft.com/microsoft.public.officedev
or via browser:

OfficeDev discussion group
http://microsoft.com/communities/newsgroups/en-us/?dg=microsoft.public.officedev

Office XML discussion group
http://microsoft.com/communities/newsgroups/en-us/?dg=microsoft.public.office.xml

B. MS Office Community discussion/newsgroups via Web Browser
http://microsoft.com/office/community/en-us/default.mspx
or
Microsoft hosted newsgroups via Outlook Express/newsreader
news://msnews.microsoft.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top