Patrick\’s Bytes

23, May 2008

Compatibility Pack for Office 2007 file format does not render <w:dataBinding>

Filed under: OpenXML,Word — patrickyong @ 10:01 am

I created a Word 2007 file with data binding to a CustomXML part

clip_image001

When I open it in Word 2003 with the capability pack installed, the data is not displayed.

clip_image003

After some investigation, I open up the document.xml (just rename the word file extension to .zip instead of .docx) and realize that the compatibility pack only renders the content inside <w:t> tag and ignores the XPath binding on the <w:dataBinding> tag. Below is a part of my document.xml, notice the blue colored text.

<w:sdt>
– <w:sdtPr>
  <w:dataBinding w:xpath=”/root[1]/name[1]” w:storeItemID=”{b6aa39be-c6d5-40ca-a66e-93dbd069104f}” /> 
  <w:id w:val=”3411243″ />
– <w:placeholder>
  <w:docPart w:val=”DefaultPlaceholder_22675703″ />
  </w:placeholder>
  <w:showingPlcHdr />
  <w:text />
  </w:sdtPr>
– <w:sdtContent>
– <w:p w:rsidR=”006D15FD” w:rsidRDefault=”00F43988″>
– <w:r w:rsidRPr=”00583873″>
– <w:rPr>
  <w:rStyle w:val=”PlaceholderText” />
  </w:rPr>
 
<w:t>Click here to enter text.</w:t>
  </w:r>
  </w:p>
  </w:sdtContent>
  </w:sdt>

If you are creating a WordML document thru this manner and want to enable it for users of older version of Word, remember to update your <w:t> tag as well.

Advertisements

3 Comments »

  1. […] May 2008 In my previous post I discovered that Content Controls in WordprocessingML files which has data binding to a CustomXML […]

    Pingback by Solution to replace content of <w:t> inside Content Controls for rendering in previous version of Office « Patrick’s Bytes — 27, May 2008 @ 4:48 pm | Reply

  2. Thanks a lot. Solved the problem. But it took quite a long time to find this post.

    Comment by jawahar — 10, April 2013 @ 10:27 pm | Reply

  3. bbs.uchao.net

    Compatibility Pack for Office 2007 file format does not render <w:dataBinding> | Patrick\’s Bytes

    Trackback by bbs.uchao.net — 20, December 2016 @ 4:29 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: