473,388 Members | 981 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Building a Word 2003 Document with XML

I have an old product that generates a Word document using Word
Automation (tables, pictures, etc). The execution speed is quite slow
and I'm finally at the point where I can tell my customers that they
HAVE to have Office 2003.

That brings me to the potential of using .NET and building a Word
document using Word XML instead. The document won't have a specific
format - this product randomly produces a test by writing out question
groups, questions and answer choices. Some groups or questions may or
may not contain images. The answer area contains hidden text that
indicates the correct answer so that printing with hidden text turned
on produces the answer key.

In addition, the user enters the questions and answers in a rich text
box. So, formatting information such as font, color, bold, etc. is
embedded in a text string that I pull out of a

Is doing something like this possible? Most of the examples I see
address filling in specific values in a template and not just
generating an entire document from scratch.

Also, can anyone recommend a good reference of the subject?
Thanks in advance!

Jul 21 '05 #1
2 1691
I've designed several computer-based questionnaires / test systems the way
you propose. Both with Windows Forms and Web Forms UI.

Test Generator creates questionnaire in XML format. This allows Windows
Forms, Web Forms and plain vanilla paper UI.
Results are stored in MS-SQL server. Reporting uses SQL Reporting Services.

You can create the XML file
a) with .NET XML classes (this is what I did up to now) or
b) wait for Visual Tools for Office 2003 in VS.2005 (I have no experience
with it) as this is a step towards what I call "server-based Office

I have not yet tested embedding Flash animations in XML files, it should be
possible. The Flash player control for .NET Windows Forms works ok.

Why do you bind your XML file to MS-Word as the target software to run the
Word doesn't give you enough control out of the box when running tests
(verify signature and decrypting the XML, test time limitation, ...)

I would design the XML file without Word in mind and offer Word as one of
the many user interface options. Think PDA and mobile network limitations!

Yet using Visual Tools for Office should cut your development time when
using Word-specific features (compared to manually coding using XmlWriter or

There is multimedia training material available for Visual Tools for Office
on MSDN -(wait for the 2005 updates if you have the time).

pls keep us updated about your design decisions!
best regards herbert

Jul 21 '05 #2
The software product generates test (in Word document form), it doesn't
have anything to do with administering them. The requirements for the
"editor" portion are to provide forms that allow the user to specify
questions and answers with rich text formatting and optional diagrams
(along with many other attributes such as group text & diagrams). The
requirements for the "test generator" are to take these questions and
produce a final test as a Word document (there's many different options
on how to generate the tests).

The technical question that I have is if I'm producing this kind of
"free-form" document with formatting embedded in rich text, is
WordProcessingML going to be of any use to me? I've gone through all
the articles that I can find on Word's XML features, but they're all
geared towards producing "report-style" documents.

Jul 21 '05 #3

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

Similar topics

by: Neil | last post by:
An article at http://news.com.com/2100-1012-991694.html?tag=fd_top states: "XML would allow easier interchange of data generated in Office documents with back-end systems or existing Web...
by: Howard Kaikow | last post by:
MSFT KB article 302896 includes a step by step example demonstrating how to build an Office COM in VB .NET, Yesterday, I implemented the example and it works correctly when starting each of the...
by: FinallyInSeattle | last post by:
I have an old product that generates a Word document using Word Automation (tables, pictures, etc). The execution speed is quite slow and I'm finally at the point where I can tell my customers...
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...
by: jimryder | last post by:
Hi, The following snippet: (ds is a populated dataset) string sXSLT = @"C:\XML\template\template.xsl"; string sTemp = @"C:\XML\temp\temp.xml"; string sOutput = @"C:\XML\output\output.xml";...
by: Niyazi | last post by:
Hi, Its like a I am searching alot but still not found or satisfy what I found it. My question is that I had SQL server that contains some data. I also have a application folder call...
by: Colin Halliday | last post by:
I have a Word 2003 mail merge main document (form letter) that is linked to another Word document data source for the mail merge. If I open this doc using the Word GUI, it first asks me to...
by: funeeldy | last post by:
I need to locate a particular table in a document. I cannot hardcode the table number since it could be different in every doc. I do have some header text that comes right before it consistently,...
by: Andy | last post by:
Hi, I have an XML document that uses namespaces (it is from a Word 2007 file). I want to retrieve all the "t" elements that belong to the "w" namespace (<w:t>) using XPath from VB.NET 2003 (.NET...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
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...
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,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.