Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please help me. I want to do this with out adding Microsoft.Office.Interop.Word.dll
Posted
Comments
Sergey Alexandrovich Kryukov 29-Jan-15 11:02am    
Not using interop is very reasonable. Microsoft has articles warning against use of it in server settings.
It is not really needed.
—SA

1 solution

Unfortunately, Word is a proprietary product not intended to be embedded in 3-rd party products; even though the present-day Word document format is based on the open standard OpenXML, the available solutions for Silverlight are mostly proprietary. You can do your search and see:
http://bit.ly/1wEvybI[^].

If you really want to byte a bullet still getting limited functionality, you can read Open XML document using Open XML SDK you can obtain from Microsoft free of charge and map the content to, say, Rich Text. Even this component would be 3rd-party. See, for example, this open source product: http://richtexteditor.codeplex.com[^].

I would question the whole idea of using Word documents. As you can see, it's not going to be easy. Word documents are not part of W3 standards and look foreign on the Web. Nevertheless, there are many sites using or even editing Word documents on the page. However, this is usually done by mapping the documents onto HTML/XHTML. Indeed, HTML features are much closer to Word than, say, RTF. So, why not using HTML pages for this task, instead of Silverlight?

—SA
 
Share this answer
 
Comments
Member 10237227 30-Jan-15 0:13am    
Thanks for Replay

http://www.aspose.com/docs/display/wordsnet/Display+Word+Documents+in+Silverlight

In the above link Documents are converting to XPS Format. But in my requirement i don't want to convert the source document to other formats . is there any other way to do this?
Sergey Alexandrovich Kryukov 30-Jan-15 1:55am    
You are welcome.

Now... What do you mean "I don't want to convert"? All right, means that you would want to develop another Word, maybe just the rendering, just the viewers, only for Silverlight, a very different platform, from scratch. Existing MS Word is strongly coupled with native Windows API. Try to imagine how much cost and how much time of development would it mean.

Actually, products which reproduce Word functionality for different platforms do exist, such as open-source and multiplatform LibreOffice, also for native platforms. It does support .DOC and .DOCX documents. Even if we imagine that you are willing to use major part of this code (there are few other similar open-source products, also multi-platform, ported to Windows, Unix-like, including Linux, including Android), just the porting work would still be huge.

I just don't know, maybe you can find some component for Silverlight. But I would not hold my breath. I can explain my idea. For example, even such thing as WPF FlowDocument component is not available in Silverlight, even though Silverlight has a lot in common with WPF. It looks like Silverlight is scaled down compared to WPF so much that people don't think that it would worth the effort...

—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900