Solved

Problems embedding Word in VB.Net

Posted on 2004-09-06
5
223 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 70

Expert Comment

by:Éric Moreau
ID: 11990519
0
 
LVL 1

Author Comment

by:wselles
ID: 11990620
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 70

Accepted Solution

by:
Éric Moreau earned 250 total points
ID: 11991230
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
ID: 12102225
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
ID: 12111616
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Close tabpage of custom control 9 34
VB.Net Report Printing Issue 3 32
Import a txt file into a DataGridView and TextBox 20 38
Footer for each row on Gridview 2 21
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 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