Word Template with XML

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
 
C

copyco

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top