Erika Ehrli - Adventures with Office Products & Technologies

MSDN & TechNet: Releasing Office, SharePoint, Exchange & Lync Centers and content for developers and IT professionals. News, technical articles, code samples, training, and learning resources.

Hosting Office in .NET applications

Hosting Office in .NET applications

  • Comments 41

If you are building a .NET application and you are struggling to find a way to host Word documents, Excel spreadsheets, Visio drawings, Project files, or PowerPoint presentations, you might consider using the Visual C++ ActiveX Control for hosting Office documents. I learned about this download resource and I was shocked to see how you can add it to your solution and start working with Office applications in less than a minute. You can open Office applications, format content, update documents, save changes, print, and more inside your application. The Office Framer Control is an Active X control written in C++. The download includes source code to extend the functionality and sample code to use it inside Visual Basic 6 and HTML pages. You can also enable and disable specific functionality by using a full set of properties, methods, and events exposed for customization.

You can also host the control inside managed applications following these simple steps:

  1. Download and install the Office Framer Control 1.2 Sample.
  2. Start Visual Studio .NET. 
  3. Open your WinForms or WebForms application.
  4. Add the DSO Framer Control to the Toolbox: 
    • On the Tools menu, click Customize Toolbox (in Visual Studio .NET 2002), or click Add/Remove Toolbox Items (in Visual Studio .NET 2003), and then click the COM Components tab. 
    • On the COM Components tab, select DSO Framer Control Object. 
    • Click OK to close the Customize Toolbox dialog box.
  5. Select the DSO Framer Control icon that appears in the ToolBox and drag-and-drop the control over the Form or Web Form.
  6. Adjust the control’s docking/size as needed.
  7. Build and run the application.
  8. Create a new document to test the control.
I have to warn you that the control is not supported, the control and the source code is provided AS-IS for customization. However, you still can extend the functionality and it does the job, so have a peek and enjoy!

Leave a Comment
  • Please add 5 and 1 and type the answer here:
  • Post
  • Hello Erika! I am writing to you from Portugal. I'm a Microsoft Application Developer and I own a small ISV company and I develop many applications that integrate with Office (especialy in VB6 and VBA). I have been a developer for .NET since the first versions ou VS.NET and now I am developing integration with Office using .NET instead of VB6. I have to say that I found your blog very usefull and this tool here (DSO Framer Control) is realy cool. I'm going to explore it a little bit more. Thanks!

    Rui Alves
  • Nice tool. I am going to check it out and explore it a little bit more.
  • Hi
    Its really pretty good control. I want to use it in my application but when i included the project in my application its giving an error
  • Cyrillic symbols in menu shows incorrectly
  • I am porting an MFC application to .NET using C#.  The app has the feature of establishing OLE Link with Excel.  For example, user can copy a cell from Excel 2003 and do "Paste Link" to the app, and these 2 become linked together through OLE Link.

    I could not find anything on the internet do enable me to do that in C# and .NET.  Will this control help on this issue?

    Also I just heard about VS Tools for Office but have not tried it.  Does VSTO offer any help in this issue?

    Thank you in advance for any input.


  • Hi,
    The control seems to work fine but i'm having trouble deploying it using one touch in vs2005.
    when i try to run the application on another machine i get the following error,

    System.InvalidCastException: No such interface supported at DSOFramer._FramerControl.get_ActiveDocument()
  • dear erika, hi great control, ot sure if i should post this here but having trouble opening a document on a remote server using URL,in write mode ( document opens only if i say read only - i have check folder permissions etc. but no luck...the error msg says unspecified error on the open.. can you help?
  • I want to access the DSO Framer Control Object programetically ?

    if open/save form url should one open form
    specified folder

    and i want to disaply some menu option
  • Is there similar control in the native .NET?

  • can someone help me open a excel file through code using dsoFramer.
    Opening through file menu is perfect.
    but opening through code is giving me a lot of trouble.
    I am using Visual C++ 6. Enterprise Edition

    Hope to listen from someone :(
  • Is there a place where all the events and properties of DSOFramer are listed? Its turning out to be a major time taker while searching for them.
  • readonly do not work ,please give me some help ,thank you!

  • Pls. can u tell me which versions of Internet Explorer support DSO Framer controls. And tell me which other browsers support it with which plug-ins. Pls. tell me am facing problem in opening

    DSO framer in my Internet Explorer. Pls. tell me clearly because i have clear this problem to my client also.

    My email :


  • Pls. can u tell me which versions of Internet Explorer support DSO Framer controls. And tell me which other browsers support it with what plug-ins. Pls. tell me am facing problem in opening

    DSO framer in my browser. Pls. tell me clearly because i have to clear this problem to my client also.

    My email :


  • I canot import the dso framer control to Visual studio 2005 tool box??can you plz help me in tht??

Page 1 of 3 (41 items) 123