Word Template with XML

  • Thread starter Thread starter Michael Steffen
  • Start date Start date
M

Michael Steffen

Hi all,

I'm trying to create a Word Template, that reads and xml file when a new
document is created.
The xml file contains information of all employees, that use the template to
create a letter.
At startup the user should select an employee and then specific information
for that employee should
inserted in the document at specific bookmarks.

Here's a sample xml - file:

<Employees>
<Employee>
<ID>1</ID>
<Name>Michael Steffen</Name>
<Phone>+555-555/555</Phone>
</Employee>
<Employee>
<ID>2</ID>
<Name>Bill Gates</Name>
<Phone>+555-555/555</Phone>
</Employee>
</Employees

How do I present the user a dialog, in which the available employees are
populated and how do I select
the corresponding specific information for the employee selected? I have no
idea of how to navigate
through the xml - document.

Shall I populate the data in a dataset first? Has anyone done something
similar before?

Thanks for your help...

Greetings from Germany,

Michael
 
Michael said:
Hi all,

I'm trying to create a Word Template, that reads and xml file when a new
document is created.
The xml file contains information of all employees, that use the template to
create a letter.
At startup the user should select an employee and then specific information
for that employee should
inserted in the document at specific bookmarks.

Here's a sample xml - file:

<Employees>
<Employee>
<ID>1</ID>
<Name>Michael Steffen</Name>
<Phone>+555-555/555</Phone>
</Employee>
<Employee>
<ID>2</ID>
<Name>Bill Gates</Name>
<Phone>+555-555/555</Phone>
</Employee>
</Employees

How do I present the user a dialog, in which the available employees are
populated and how do I select
the corresponding specific information for the employee selected? I have no
idea of how to navigate
through the xml - document.

Shall I populate the data in a dataset first? Has anyone done something
similar before?

Thanks for your help...

Greetings from Germany,

Michael

I don't think I can answer your question, but the thought occurs to me
that maybe this project would be better written in VBA. Have you
thought of that?
 
Back
Top