Answered embedding word in wpf

  • Thursday, August 02, 2007 7:47 AM
     
     

     

    hello there.

     

    I need to embed word doc editing inside my wpf application. i read almost everything i could google about it and some threads in this forum but still stuck at point 0.

    Any one here had success in doing such a thing and could point me to the right direction ?

All Replies

  • Monday, August 06, 2007 7:06 PM
     
     

    What level of integration do you need?

    Here is a related discussion: http://forums.microsoft.com/MSDN/showpost.aspx?postid=1824717&siteid=1.

  • Monday, August 06, 2007 7:56 PM
     
     Answered

    Actually, I have done that, this what I had to do (if you want a tutorial, I will have to actually sit down and write it up):

    First get the DSO framer project:

    To the article that discusss it: http://support.microsoft.com/kb/311765

    the download for it (office 2007):

    http://www.microsoft.com/downloads/details.aspx?FamilyId=CE2CA4FD-2169-4FAC-82AF-770AA9B60D77&displaylang=en

     

    After you get it, you have to compile it so it is available in Visual Studio.

    Now in your WPF Application, add a new project to the Solution, Add a Windows Control Library.  In that project, add a reference to the DSO Framer control.  Set that control into the user control that is created by default (set the properties to doc the control to the workspace), save it.

     

    Return to your main project,  now make sure you have referenced WindowsFormsIntegration (I use C#, but I'm sure it is similar to VB) and have referenced your new UserControl Project (lets call UCWinWord for reference)

    Create  WindowsFormsHost Object,

    Create new user control from UCWinWord,

    add the user control to the windows form host object, then add the windowsformshost object to the window.

     

    This is a down and dirty presentation, if you want code let me know I can write up a complete tutorial tonight sometime.

     

     

  • Wednesday, August 08, 2007 11:17 AM
     
     

     

    thanks alot for the info. no need for code atm, but if you have the time i am sure your tutorial will be helpfull in the future.