Re: Import XML into Word Document
- From: Cindy M -WordMVP- <C.Meister-C@xxxxxxxxxx>
- Date: Tue, 07 Mar 2006 22:22:40 +0100
Hi =?Utf-8?B?THVuZEs=?=,
today I read an Article on MSDN on how to create Word templates that use XML(http://msdn.microsoft.com/office/understanding/xmloffice/codesamples/default.asp
schemas. The Articel is called "Creating and Applying an XML Resume Template
in Microsoft Office Word 2003"
x?pull=/library/en-us/odc_wd2003_ta/html/odc_wdxmlresumetemp.asp)
The features described are very nice, at least the option to export the dataYou have, in Word 2003 without VSTO 2005, basically three possibilities:
as XML. Now I am searching for a way to import this data into my template. Is
there a way to do this? I understand that the saved XML can be used in other
applications but I would like to use Word to show XML data from my .NET
application. This would be a very nice way for reports or maybe mailmerges.
1. Use a transform when opening the document that "merges" data into the Word XML
document.
2. Use the basic XML tools the .NET Framework offers to parse the (closed) Word
XML and add the data, then open the result
3. Automate the Word object model, using the InsertXML method to place the data
(in valid WordProcessingML format) into the opened document.
Current versions of Word provide for no "mail merge"-type ability to import XML
data. You might want to take a look at VSTO 2005 and see if the "data islands"
are closer to what you're looking for. Word 2007 will also have some new features
that will probably interest you, so when you can, sign up for Beta 2.
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 :-)
.
- Follow-Ups:
- Re: Import XML into Word Document
- From: Jan - LundK
- Re: Import XML into Word Document
- Prev by Date: Re: Mail Merge w/ HTML Data Source (Word 2003)
- Next by Date: Re: Visual C++ 2005 Excel Automation
- Previous by thread: Visual C++ 2005 Excel Automation
- Next by thread: Re: Import XML into Word Document
- Index(es):
Relevant Pages
|