Solved

Problems embedding Word in VB.Net

Posted on 2004-09-06
5
217 Views
Last Modified: 2010-04-23
Hi,

I'm developing a VB.Net application which outputs to Word. However it also needs editing in Word. To do this I want to embed Word in my application. I tried this using the webbrowser control (MS KB  Q304643). The problem is that when I open a document, I get the question whether I want to open or save the document, just like in a normal webbrowser. The other problem is that I can't override the Short-keys like Ctrl-N, which opens a new Word window. Does any one have experience with this? And found a solution to it? It would be very helpful.


0
Comment
Question by:wselles
  • 2
  • 2
5 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
0
 
LVL 1

Author Comment

by:wselles
Comment Utility
Thanks. Works fine with notepad, but doesn't work for Word. It just opens a new Word window.... It works with Excel but Excel then shows separately in the task bar.
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 250 total points
Comment Utility
If you start Word without being in the debugger and without having loaded Notepad first, it works!
0
 
LVL 3

Assisted Solution

by:mpemberton5
mpemberton5 earned 250 total points
Comment Utility
wselles, I believe you can't embed Word into an VB.NET app.  I worked on a project several months ago and I had found a Microsoft page that stated you couldn't embed it.  Here's Microscrap's note on it - http://support.microsoft.com/default.aspx?scid=kb;EN-US;304562.

With that, I had to get creative.  What I did was do a dynamic conversion of the Word document to an RTF format and display it in a RTF box.  You should be able to do some editing within that, but unfortunately it isn't like Word.  I hope this helps some.  If anything, it gives you a closure on the embedding issue.  If you do come up with another solution, I'd be interested to see what you did.
0
 
LVL 1

Author Comment

by:wselles
Comment Utility
mpemberton5, a while ago I found an article about it in c# ( http://www.codetools.com/cs/miscctrl/winwordcontrol.asp ). Although it had very limited functionality (which I can't adjust because I don't know C#), it did work. I was hoping there was a similar VB.NET method.

Currently, I'm working on an alternative structure: creating a dll for Word, making Word the main window, which is not a very nice resolution, but it beats working with two different windows.

Cheers,
ws
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now