tags:

views:

229

answers:

5

How do you open a word document in VB.NET. The document is a manual for the program.

A: 

Google result 1 for "vb.net Word document":

http://www.vbdotnetheaven.com/Uploadfile/mgold/WordDocument04182005081441AM/WordDocument.aspx

That describes how to run, open, etc. a Word document from VB.net.

Hawkcannon
I don't think that's what the question wants.
Ninefingers
+5  A: 

You need to call Process.Start(documentPath).

SLaks
Why was this downvoted?
SLaks
I upvoted, no idea.
Cyclone
A: 

Have a look at http://www.dreamincode.net/code/snippet520.htm, which shows how to open any external file in their associated external viewers.

Chris Dennett
A: 

Use Process.Start to launch a Word document in the appropriate editor.

If you have access to the assemblies, you can use the Microsoft.Office.Interop.Word namespace to manipulate Word documents in code, though this is probably nowhere near as trivial as Excel interop, unless you're making very simple word documents.

Nick Bedford
A: 

The Microsoft Web Browser Control can display ActiveX documents. This control can be placed onto a WinForms or WPF application

Microsoft Word is a ActiveX document provider. So you can load Microsoft Word documents into the Web Browser control. See this example for VB.Net 2005

You then have total control of the Microsoft Word child window. Load any document, re-size window, change visibility etc, you can even send control messages (macros)

Some other SO references:

TFD