0

I am in trouble to host the MS Office in Win form. After doing google i have come across that microsoft has removed dsoframer.ocx. So can anyone please help me how should i host MS office in a winform? I have found some third party tools like Edraw. But i want to do it by own without using any third party tools?

Any help would be appreciated.

Md. Rashim Uddin
  • 492
  • 1
  • 6
  • 15
  • Microsoft Office is a package containing many tools. Could you specify for S.O users what your purposes are, and more specifically, which programs from the MSO package you would like to host? – Matthew Layton Nov 20 '12 at 08:53
  • Actually i want to embed Microsoft Office/Excell/PP in a windows form so that user can Edit/delete on the file from the application but not opening the any file outside. Could you please suggest any tool which is available for that. Previously i used dsoframer.ocx.control to host this. – Md. Rashim Uddin Nov 20 '12 at 09:13
  • There may well be more suitable, managed mechanisms for interoperability with office products (see here: http://stackoverflow.com/questions/757023/embed-excel-sheet-in-c-sharp-user-control), however I am unsure that this will prevent an IT savvy user from editing the file outside of your application. Also, you might want to consider that the user will need MSO installed on their machine for MSO interoperability. – Matthew Layton Nov 20 '12 at 09:27

1 Answers1

2

What you are looking for is called OLE, Object Linking and Embedding. Originally released in 1990, Microsoft Office was the last main Microsoft product that still supported it. Time has not been kind to OLE, the protocol was complicated and very hard to get right. Also very detrimental to program stability, you would not just import another program's windows and UI but all of its bugs as well.

Notable is that the .NET framework shipped without any support for it at all. Office 2007 was the last one that supported it but there were several nasty and unsolvable problems with it. DsoFramer was removed from the Microsoft servers just before Office 2010 beta was released.

This is gone forever and won't come back. Move forward by embedding your UI into the Office program, not the other way around. Very well supported in VS with its Office project templates. There are 3rd party products that support embedding a word processor or spreadsheet in your own program.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536