Word 2007 doc.CustomXMLParts.Add() Method?

C

Cindy M.

Hi Steven,
Does anyone have an example for using the doc.CustomXMLParts.Add() method?
Here are two variations. The commented lines are for using XML defined in
the code. The other two load the XML from an outside file.

'xmlPart = "<?xml version='1.0' encoding='utf-8' ?><v:trees
xmlns:v='http://cindymeister.com/ContentControlsStuff/Values'
xmlns:l='http://cindymeister.com/ContentControlsStuff/List'><v:value/><l:tre
es><l:tree>oak</l:tree><l:tree>maple</l:tree></l:trees></v:trees>"
'Set part = doc.CustomXMLParts.Add(xmlPart)
Set part = doc.CustomXMLParts.Add()
Debug.Print part.Load("C:\test\forest.xml")


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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