Group:  Microsoft Word » microsoft.public.word.docmanagement
Thread: Save uploaded file in WordML (XML) format

Geek News

Save uploaded file in WordML (XML) format
Satish Jadhav 12/11/2008 6:00:14 AM
Hi,

I have a area where a user uploads a file and I want to save the uploaded
file as .XML document (WordML Format), in back ground programmatically.

As this is possible by opening a file in background and saving a file in
different format.

For e.g.
object o_format = Word.WdSaveFormat.wdFormatXML;

but here we have to say “document_object.Open()”. The problem is when the
concurent user do the same operation, (Performance Issue).
Is there any way I can save a uploaded doc file in xml format with opening
uploaded file in background ?

Thx,
Satish Jadhav.

Re: Save uploaded file in WordML (XML) format
Cindy M. <C.Meister-C[ at ]hispeed.ch> 12/13/2008 11:20:37 AM
Hi Satish,

[Quoted Text]
> I have a area where a user uploads a file and I want to save the uploaded
> file as .XML document (WordML Format), in back ground programmatically.
>
> As this is possible by opening a file in background and saving a file in
> different format.
>
> For e.g.
> object o_format = Word.WdSaveFormat.wdFormatXML;
>
> but here we have to say “document_object.Open()”. The problem is when the
> concurent user do the same operation, (Performance Issue).
> Is there any way I can save a uploaded doc file in xml format with opening
> uploaded file in background ?
>
No. Unless you can find a third-party tool that can convert the binary file
format to the XML file format. (Or program one yourself, but the task would be
decidedly non-trivial.)

Why not ask the user to save in the correct file format?

Or, make a copy of the file and put it somewhere the user cannot access it. Open
and convert this file, then replace the other, when it's not locked. Of course,
the possibility exists that the user may make changes that will then be lost.
But you run this danger under your current scenario, as well. A Word document
cannot be opened and modified by more than one user.

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 :-)

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net