Welcome to MSDN Blogs Sign in | Join | Help

News

  • who's online visitors here with you. Programming Microsoft® Office Business Applications Locations of visitors to this page
    Bookmark and Share
    Erika Ehrli on Twitter MSDN_Office in Twitter Follow us on Twitter
    MSDN_Office in Facebook Join MSDN Office on Facebook
Hosting Office in .NET applications

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!

Posted: Friday, August 26, 2005 6:00 PM by erikaehrli
Filed under:

Comments

Rui Alves said:

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
ruialves@edireizinho.pt
# October 18, 2005 1:56 PM

Rui Alves said:

Nice tool. I am going to check it out and explore it a little bit more.

ruialves@edireizinho.pt
PORTUGAL
# October 19, 2005 4:53 AM

sam said:

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
# March 24, 2006 6:03 AM

Stas said:

Cyrillic symbols in menu shows incorrectly
# April 6, 2006 6:39 PM

TJ Han said:

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.

TJ

# April 7, 2006 12:10 PM

brufus said:

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()
# April 11, 2006 9:24 AM

shahab said:

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 (oframe.open). 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?
# May 18, 2006 11:51 AM

joseph said:

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
# May 31, 2006 4:25 AM

Love said:

Is there similar control in the native .NET?

Love.
http://FrogFind.com
# August 1, 2006 2:00 PM

Aseem said:

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 :(
# August 8, 2006 9:33 PM

Rajeev said:

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.
Thanks.
# August 22, 2006 4:07 PM

Luck said:

readonly do not work ,please give me some help ,thank you!

tjjhua@hotmail.com

# October 23, 2006 12:52 AM

AbdulAleem said:

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 : aleem_abdul@akebonosoft.com

Aleem.

# November 9, 2006 9:52 AM

abdul_aleem said:

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 : aleem_abdul@akebonosoft.com

Aleem.

# November 10, 2006 9:27 AM

jimmy george said:

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

# March 13, 2007 12:47 AM

Peter said:

You can install it in the 2005 toolbox. Pretty tricky though. Furthermore... is you do a lot of calls I get timing issues with the Excel COM. I haven't found a way to time the threads yet.

# March 26, 2007 5:11 AM

Pachara said:

Hello

I can't set summary property (Keywords).

Help me please

# March 27, 2007 4:51 AM

Ruben Castelo said:

Hi ! im using the DSO but i want to set the zoom of the document by code .. and some others propertys, can anybodi help me ?

Tnx !

rcasstelo@hotmail.com

# May 9, 2007 4:18 PM

Abdul said:

Hi! ALL

      The site is grt. Can anyone direct me how  to host complete visio in the .net managed application using dsoframer ? I have used visio drawing control. I want visio in my application like the one shown in the pic in this page

# May 12, 2007 3:58 AM

Adbul said:

my mail id

kalam.pattan@gmail.com

# May 12, 2007 4:02 AM

Evgeny said:

I suppose it's absolutley awful!

Why microsoft don't want to create a good implementation of the office viewers which can be easily embedded into Windows Forms and WPF.

Such controls are microsoft undone work. I've also used such tricks as putting the WebBrowser control into the form then opening a localy store .ppt file. It seems to me as an awful solution... but it's the only worked.

You should better create a better Office Control for .NET applications.

# August 2, 2007 6:08 PM

Confused_One said:

Will you marry me.  Thanks...just what I needed!!!

# August 14, 2007 12:24 PM

dsoframer said:

Every time I call the print preview, the ms office crashed when exit the print preview. I am using the Office 2003. It's very strange thing. I have update all the office package. But it look like no help. Any suggests are welcome.

# August 15, 2007 4:12 AM

Bhaskar said:

I want to add commandbars to DSoframer control(i mean after opening a word document only)and add items dynamically to the commandbar control dropdownlist.

I am customizing the source code for my purpose. Please advice me  is this possible?

# October 25, 2007 10:15 PM

Miguel said:

I can't add dso framer to the vs2005 toolbox could you help me please???

# October 31, 2007 1:33 PM

Robert said:

Hi, many people are asking about adding DSO framer into VS2005 toolbox. Does anyone have a reply for this, as I have not managed either.  When adding the DSO framer to the toolbox (VS2005) the control appears disabled, and I am not able to use it. Any ideas?  The same thing happens when adding the Visio Drawing Control to the toolbox in VS2005

# December 18, 2007 8:55 AM

Michael said:

Open your VB.NET or C#.NET 2005 project.

Click on the Tools pull-down menu and the Choose Toolbox Items option.

Click on the COM Components tab.

Scroll down in the Listbox to find "DSO Framer Control Object" and click on its Checkbox.

If it's not in the list, click the "Browse" button and navigate to wherever dsoframer.ocx is loaded on your machine (on my system it's at: c:\DsoFramer\dsoframer.ocx).

Click OK.

Look for it in the "General" section of the Toolbox.

# January 28, 2008 1:04 PM

Jacky said:

I developed an application with VB 2005. I'm using dsoframer control in the application to host MS Word document.

I have no problem to load the word doc inside the dsoframer. But the problem is every time i click on the Print Preview button to preview the document and then close the print preview screen, the loaded

document become a blank document inside dsoframer. In other word, the content on the document is gone! Then i tried to click on the Print preview button again, i

found out that the content is still there under the preview mode. But i wonder why when i clicked on the close print preview, the content of the document is gone??

Can anybody tells me why and how to fix this? Thanks in advanced...

# February 12, 2008 11:00 AM

zachary said:

I have tried to download the control from the page listed above (http://support.microsoft.com/default.aspx?scid=kb;en-us;311765) but I get an error when i try to run the exe.  The error message states the file is not a valid win32 application.  Is there another download place?  Is anyone else having this problem??

Thank you,

zh

# February 14, 2008 4:08 PM

zachary said:

Well, i got the sucker to work...somehow.  Musta been the gremlins...or possibly the aliens

# February 14, 2008 4:43 PM

Heinrich Braasch said:

Got this control to work relatively well using VB.NET after starting to play with the FramehookPolicy and ActivationPolicy properties. Stil another problem remains... when loading MsProject and opening the "Task Information" dialog, it appears it does not recieve some of the messages (e.g. cannot change fields in it). Anybody out there with some suggestions? Shall be much appreciated. Regards.

# May 4, 2008 4:30 PM

gust said:

hi,i have tried the method ,and it's cool . but can you tell me how to get a reference of the  document/worksheet  that the cotrol opened? i want to change something through code,so it's important to me.

# May 24, 2008 11:10 PM

Ana Silva said:

Good afternoon.

I was trying to open a word document programaticaly on my page load event of the webform.

Like this:

objWordDoc = New DSOFramer.FramerControl

objWordDoc.EventsEnabled = True

objWordDoc.ModalState = False

objWordDoc.Open("WORD_URL_PATH", True)

But it despalys an error.

Can anyone tell me if I'm doing anything wrong?

Best regards,

Ana Silva.

# June 16, 2008 6:43 AM

NK said:

Has anyone tried using this control in an ASP .Net application? The DSO Framer Control in the toolbox appears greyed out for ASP .Net apps, but is available for Windows Apps.

# June 20, 2008 3:18 AM

LandroHun said:

Hi, I'm also involved in asp.net version. Could anyone share some source code?

# July 8, 2008 9:18 AM

Haneef said:

Hi All,

Can any one help me or provide me a sample code. How to save a word document on web server through DSOFramer.ocx

I will appreciate if the code in c#

Very Best Regards,

# August 24, 2008 5:21 AM

Aniruddha said:

Hello,

Its really nice tool,but i would like to open XML file but it is giving me error.

what i need to do to open XML files and office 2007 files.

# May 25, 2009 5:58 AM

Niluka Subasinghe said:

Hi,

I'm not very much familiar with vc++. I worked with this control. I want to extend the functionality of this control. I want to restrict the user to copy and paste the document when it is necessary.

How can i do this? Please help.

Regards,

Niluka

# July 14, 2009 4:43 AM

Txarly said:

How can i download the control? the url do not work fine.

# November 13, 2009 1:28 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker