Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XPath expression to a custom property in Word 2007 ?

From: "Kay-Christian Wessel" <kayhanse@------.-->
To: NULL
Date: 11/8/2008 7:11:00 PM
I'm trying to map a custom property of a Word 2007 document to a 
contentcontrol.

Mapping is not so hard :

Dim strXPath As String
strXPath = "tree/fruit/fruitType[1]"
ActiveDocument.ContentControls(1).XMLMapping.SetMapping strXPath

But setting the right XPath is is giving me a hard time.

Here is the custom XML file :

  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <Properties 
xmlns="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties" 
xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">
- <property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="2" 
name="MyFirstCustomProperty">
  <vt:lpwstr>FirstText</vt:lpwstr>
  </property>
- <property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="3" 
name="MySecondCustomProperty">
  <vt:lpwstr>SecondText</vt:lpwstr>
  </property>
  </Properties>


What would be the correct XPath expression to MySecondCustomProperty ?


Kay 



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent