Microsoft Developer Network > Forenhomepage > Visual Basic General > Is there a way to embed a Microsoft Word document to a Windows form?
Stellen Sie eine FrageStellen Sie eine Frage
 

BeantwortetIs there a way to embed a Microsoft Word document to a Windows form?

  • Donnerstag, 13. März 2008 18:57David Reynolds in Cincinnati TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     

     

    Hi there.  I was wondering about how you would embed a Microsoft Word document in a Windows form.  I was using RichTextBox to load it in RTF, but I don't like the way the RichTextBox loads some of Word's Tables.  Additionally, I like the selection tool better in Word than the RichTextbox on Word Tables as well.

Antworten

  • Mittwoch, 19. März 2008 11:05Martin Xie - MSFTMSFT, ModeratorTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     Beantwortet

     David Reynolds in Cincinnati wrote:

    I was wondering about how you would embed a Microsoft Word document in a Windows form.

     

    Hi David,

     

    Here are two approaches to opening word document inside a Winfodws form.

     

    1. Using WebBrowser control to open (but without menubar and toolbar).

    WebBrowser1.Navigate("C:\myDocment.doc")

    2. Using third-part component winwordcontrol to open (with menubar and toolbar).

    http://www.codeproject.com/KB/office/WordInDotnet.aspx

    This article including demo project and C# source code, explains how you can integrate Microsoft Word (including Menubar and Toolbar) in your .NET applications.

     

    By the way, here are two helpful tools:

    1) Instant VB: C# to VB converter

    The tool can convert entire C# project to corresponding VB.NET project, also can convert code snippet.

    2) Convert C# code to VB.NET code by means of this Code Translator tool.

     

     

    Also try this approach to open word document inside a Panel control.

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2616199&SiteID=1

     

     

    Regards,

    Martin

Alle Antworten

  • Mittwoch, 19. März 2008 11:05Martin Xie - MSFTMSFT, ModeratorTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     Beantwortet

     David Reynolds in Cincinnati wrote:

    I was wondering about how you would embed a Microsoft Word document in a Windows form.

     

    Hi David,

     

    Here are two approaches to opening word document inside a Winfodws form.

     

    1. Using WebBrowser control to open (but without menubar and toolbar).

    WebBrowser1.Navigate("C:\myDocment.doc")

    2. Using third-part component winwordcontrol to open (with menubar and toolbar).

    http://www.codeproject.com/KB/office/WordInDotnet.aspx

    This article including demo project and C# source code, explains how you can integrate Microsoft Word (including Menubar and Toolbar) in your .NET applications.

     

    By the way, here are two helpful tools:

    1) Instant VB: C# to VB converter

    The tool can convert entire C# project to corresponding VB.NET project, also can convert code snippet.

    2) Convert C# code to VB.NET code by means of this Code Translator tool.

     

     

    Also try this approach to open word document inside a Panel control.

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2616199&SiteID=1

     

     

    Regards,

    Martin