How to insert an image in a WordML document through C#?

How to insert an image in a WordML document through C#?

am 21.04.2008 00:38:01 von Pedro Rosas Silva

Hi everyone,


Is anybody aware of a way how to insert an image in a WordML document
programmatically, through C#?

I have a C# application that loads into memory a WordML document
(XmlDocument).
The document is tagged in certain places so that the C# application
can search for those tags (using the System.Xml namepace) and fill
some text in the document.
For text items everything is simple.

But I also need to insert images in the WordML document. The <:pict>
element in WordML is quite complex.
Are you aware of any API that can do this? Given a filename, it should
insert the WordML stuff with the image.

Please notice that I cannot use Microsoft Word Object Model, because
MS Word will not be available.
It will be a Web application and the Server will not have MS Word
installed. The .Net framework available is version 1.1.


Please advice if you have any experience with images in WordML.
Thank you.
Best Regards,

Pedro Rosas Silva

Re: How to insert an image in a WordML document through C#?

am 21.04.2008 01:12:03 von mark

"Pedro Rosas Silva" wrote in message
news:76e7442d-63cb-4127-b012-b6b39f448d65@26g2000hsk.googleg roups.com...

> Please notice that I cannot use Microsoft Word Object Model, because
> MS Word will not be available.
> It will be a Web application and the Server will not have MS Word
> installed.

Server-side Office automation would almost certainly not have worked anyway:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257 757#kb2
http://support.microsoft.com/default.aspx/kb/288367

> Please advice if you have any experience with images in WordML.
http://www.aspose.com/categories/file-format-components/aspo se.words-for-.net-and-java/Default.aspx


--
Mark Rae
ASP.NET MVP
http://www.markrae.net