How to import XML data into a Word document table

G

G Stark

Is there a way to import XML data into a Word document table?

I do not need all the columns in the XML data file.

Is the an example handy. I have not been able to find one.

G. Stark
 
W

Word Heretic

G'day "G Stark" <[email protected]>,

Create and attach an XSLT to transform the XML file into something
closer to a CSV, hiding all non-necc data as well, insert this and
keep the range, use the range to convert text to table.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


G Stark reckoned:
 
C

Cindy M -WordMVP-

Hi G,
Is there a way to import XML data into a Word document table?

I do not need all the columns in the XML data file.
Which version of Word are we discussing? Assuming it's
2003, there's one method that doesn't require any VBA: the
IncludeText field provides a switch that will pick up an XML
file. Note that the XML has to be in WordprocessingML syntax.
There's also a switch that will allow you to apply a transform.

The Word object model (VBA) also has command that will allow
you to insert XML directly into the document text. Here, again,
it must comply to the WordprocessingML schema.

Otherwise, you need an approach such as Steve outlines.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8
2004)
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 :)
 
Top