Store/Retrieve Word 2003 Docs + Merging question

C

Cider123

The application I'm building is a documentation system.
I use DOSFramer to embed a Word 2003 Document into a C# application.

Here are the goals, perhaps someone can recommend the best way to do this:

1. Be able to store/retrieve content of a Word Document in SQL Server,
without saving the contents to a hard drive and then uploading the binary.
If content was simple text this wouldn't be an issue, but it contains
formatting, images, etc.

2. Be able to run a remote WCF Service that will open a Word template with
MergeFields, inject multiple Word Document content to replace the MergeFields.

My concern is when multiple people request documentation, the merge process
will cut through each other as content is copied and pasted to the
mergefields.

I thought maybe the Copy / Paste might be restricted to the application
session but it's just clipboard based. I copied text from a web site and
then ran the application calling the paste method and sure enough the content
pasted as one would expect.

I've googled for the hours reading all sorts of things, but nothing like
what I'm trying to accomplish.

Help! =)
 
C

Cindy M.

Hi =?Utf-8?B?Q2lkZXIxMjM=?=,
1. Be able to store/retrieve content of a Word Document in SQL Server,
without saving the contents to a hard drive and then uploading the binary.
If content was simple text this wouldn't be an issue, but it contains
formatting, images, etc.

2. Be able to run a remote WCF Service that will open a Word template with
MergeFields, inject multiple Word Document content to replace the MergeFields.
I'd look at working with the Word 2003 XML file format (WordProcessingML). You
should be able to get the content of an open document (with some minor
exception) using the XML property of the Document object. And write it back into
an (empty) document using the same property.

By the same token, you should be able to use a Transform or the XML DOM to write
information into the WordProcessingML, although it would probably be easier to
target XML Nodes in your own Namespace, from an attached schema than to target
margefields. But it should be possible.

You should be able to download the Word 2003 XML SDK from MSDN. And there should
be more information on OpenXMLDeveloper.org. The site targets the Office 2007
file formats, primarily, but the core Word document in that format retains the
WordProcessingML.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
C

Cider123

I'll give it a shot, thanks for the insight and sharing of knowledge.

The latest thing I've played around with is using Richtextbox controls and
using the ".rtf" property to load/save content. On rare occasions it doesn't
format right, but for the most part it does.

I'll give your suggestion a try and see what I can get to work, thanks!
 

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