?
Solved

import data from xml into msword 2007

Posted on 2008-02-12
3
Medium Priority
?
1,624 Views
Last Modified: 2011-10-03
I have developed an app that queries a database then creates n xml file hat contains the data retrieved. I am looking for a way to import this data into a word document. I would like to be able to control where different elements of data  are placed in the doc. any ideas?

thx
0
Comment
Question by:stephi01
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
Yiogi earned 1000 total points
ID: 20880262
Yes use mail merge and since you are using word 2007 and XML, you will be a happy man. Word 2007 can have an external xml source inside the actual word document so any time you want to change the source you just change the xml document. All word 2007 files are actually zip files. Simply rename it and open it with a zip editor. Navigate to the customXml folder and there you can have your custom xml files.

You can easily open and edit word files as packages with Microsoft DotNet framework 3 programmatically and change the xml files as you wish. Or you can do this manually if by renaming the file to .zip and then to .docx. There are plenty of sources online a very good side being www.openxmldeveloper.org since word 2007 is actually open xml.

If you need more help or some code let me know I'll gladly help you more.
0
 

Author Comment

by:stephi01
ID: 20885683
Thanks for the resources Yiogi! I learned a lot about openxml and found the solution I need!
0
 

Author Closing Comment

by:stephi01
ID: 31430349
Thanks for the info! I found exactly what i needed!
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
In this article, I will demonstrate that how to do a PST migration from Exchange Server to Office 365. This method allows importing one single PST, or multiple PST's at once.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question