How to open ms word document in vb.net

i can answer that,

Dim oWord
        Dim rng
        Dim odoc
        oWord = CreateObject("Word.Application")
        oWord.Visible = True
        odoc = oWord.Documents.Add
        rng = oDoc.Range(Start:=0, End:=0)
        rng.text = TextBox1.Text

at least i think this is it

i can answer that,

Dim oWord
        Dim rng
        Dim odoc
        oWord = CreateObject("Word.Application")
        oWord.Visible = True
        odoc = oWord.Documents.Add
        rng = oDoc.Range(Start:=0, End:=0)
        rng.text = TextBox1.Text

at least i think this is it

thank u for u answer
but this is not suit
any other way

System.Diagnostics.Process.Start _
("Your doc name.doc")

System.Diagnostics.Process.Start _
("Your doc name.doc")

give some breif code to open a word document

Dear rhinocort23
Thank you for ur reply
It will work .
but it will display only the content of filename in textbox.

i want to open a file in the textbox1.text
plz help me

well for that you have to use an open file dialog thing which im not to good at, someone else will have to help with that

All you have to do to open any file is Process.start("C:\example\example.doc")

thx all

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.