Solved

Problems embedding Word in VB.Net

Posted on 2004-09-06
5
220 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
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 69

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Duplicate a row 2 46
Convert to Hour/minute textbox and compare 3 52
vb.net 2 37
DataGridView does not show data rows correctly in vb.net 2013 3 29
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

943 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

11 Experts available now in Live!

Get 1:1 Help Now