473,699 Members | 2,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Word Template with XML

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
Nov 20 '05 #1
1 1080

Michael Steffen wrote:
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?

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
7413
by: Clifford W. Racz | last post by:
Has anyone solved the issue of translating lists in Word 2003 (WordML) into xHTML? I have been trying to get the nested table code for my XSLT to work for a while now, with no way to get the collection that I need. To begin, I am using xsltproc that conmes with Cygwin as my processor. I have no particular affinity to this processor except that it is open source and standards compliant. I don't like M$, but if using a M$ processing...
0
1543
by: Sudipto Sen | last post by:
================== Problem Description ================== Following code is for 1. Load a Word Template called CustomerInfo1.dot 2. CustomerInfo1.dot is a normal Word Template with Form fields 3. After opening a document on that template, I put "2" in all the fields for test Problem is,
2
12516
by: Steve M | last post by:
I'm trying to do invoke the mail merge functionality of MS Word from a Python script. The situation is that I have a template Word document, and a record that I've generated in Python, and I want to output a new Word .doc file with the template filled in with the record I've generated. (To refresh your memory, in Word a mailmerge is achieved by a) under Tools -> Letters and Mailings, check off Show Mail Merge Toolbar; b) open a document...
4
21480
by: Paolo | last post by:
Hello, I am trying to create a procedure to export my Access data to a word template. I would like to export data from two tables to a word file at the same time. My two tables are named CASES AND CLIENTS. The word (it is a template) is named MASTER To store data, I have created two forms named CASES and MASTER. Since both forms have a lot of fields, I have added the form CLIENTS as a SubForm on the form CASES.
6
2678
by: Ryan Muller | last post by:
My company just upgraded from Access 97 to Access 2003 today and we are having some issues in a database that generates a Word document from information selected in a form. Here is the code we were using without issue previous to the switch: 'Start Word and create a new doc from the template Set objWord = CreateObject("Word.Basic") objWord.AppMaximize "Microsoft Word", 1 objWord.FileNew Template:=StrTemplPath & "letter.dot"
0
4026
by: Raj Singh | last post by:
I am facing a problem with Visual C# 2003 and MS Word XP. I am using a customized template for Word and in that template I have defined some bookmarks. I am trying to create a Word document based on the customized template, reading all the bookmarks and replacing them with desired values, resulting in a new one page document being created which is then saved. This all works fine but when I try to extend the process so that the template...
4
2693
by: Nikhil Patel | last post by:
Hi all, I need to generate a word document and save it on the server from an ASP.Net application. Basically I want to load a word template and insert some field values from a dataset and save the final output as a Word document. I know there are different options to do this. But I can't decide which one I should use. I don't want to use automation on the server because of scalability issues and it is not recommended by Microsoft. So I am...
2
13529
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to execute a MailMerge to create mailing labels or customized letters. A label name known to MS Word MailMerge mailing label wizard may be used or a template file containing the field names Line1 thru Line5 for each record to be printed. If a...
7
6242
by: Dave | last post by:
Apologies for the newbie question. I have created a vb.net program for my company that is designed to work with Word Templates (about forty of them that we commonly use) that are selected by the user and populated (with info from an Access database) at run-time, then saved as Word documents. The program I have coded works fine -- it does what I need it to do. But it has two problems: (1) it runs very slowly, and (2) it does not seem to...
12
10670
by: Dixie | last post by:
Is there a way to shell to Microsoft Word from Access and load a specific template - using VBA? dixie
0
8685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8613
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9172
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7745
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4374
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.