Opening Microsoft Word

johnnyat87

New member
Joined
Apr 10, 2008
Messages
4
Programming Experience
Beginner
Sorry if this is misplaced, i am new to the forum

I need help simply opening Microsoft Word from VB.Net 2003
I need ideally to open a specific document in Microsoft Word when a button is clicked to select this option.

However, i have searched around variosu forums and all i can find is coe involving this statement:

Dim oWord As New Word.Application

But this statement alone has errors like:

'Type Word.Application is not defined'

Any help to either open microsoft Word without a document loaded, so simply run Word, or ideally open Microsoft Word with a specific document laoded when the user clicks the relevant button.

Thanks a lot
 
Opens the document in default editor, which should be Word:
VB.NET:
Process.Start("c:\path\document.doc")
Else you have to start the Word as process with filename as parameter like: process.start("the exe","the parameters"), see command line switches.
 
Back
Top