Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2006

Tip: Looking for answers? Try searching our database.

Word 2007 doc.CustomXMLParts.Add() Method?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steven H - 03 Dec 2006 02:44 GMT
Does anyone have an example for using the doc.CustomXMLParts.Add() method?
Cindy M. - 24 Dec 2006 18:30 GMT
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 :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.