Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to open a Word Document using vb.net command buttons

How to open a Word Document using vb.net command buttons

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorialquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    China Gary
    wrote on last edited by
    #1

    Do you need a component to open a word document in a new window? How easy is it to do? I have a list of radio buttons, and when i select one and hit the button, i want the document to appear in a new window. Any help would be great, thanks!

    D J 2 Replies Last reply
    0
    • C China Gary

      Do you need a component to open a word document in a new window? How easy is it to do? I have a list of radio buttons, and when i select one and hit the button, i want the document to appear in a new window. Any help would be great, thanks!

      D Offline
      D Offline
      Dave Sexton
      wrote on last edited by
      #2

      Try System.Diagnostics.Process.Start("C:\MyWordDoc.doc").

      1 Reply Last reply
      0
      • C China Gary

        Do you need a component to open a word document in a new window? How easy is it to do? I have a list of radio buttons, and when i select one and hit the button, i want the document to appear in a new window. Any help would be great, thanks!

        J Offline
        J Offline
        JustmeNick
        wrote on last edited by
        #3

        The answer you have gotton before is good but if you wanted to select a file and open that selected file..you could use this one also.. drag and drop a openfiledialog control to your form... and use the following code.. If OpenFileDialog1.ShowDialog() = DialogResult.OK Then System.Diagnostics.Process.Start(OpenFileDialog1.FileName) End If using this method... opens any file that is selected in their own program...and also a new window..

        Nab

        C 2 Replies Last reply
        0
        • J JustmeNick

          The answer you have gotton before is good but if you wanted to select a file and open that selected file..you could use this one also.. drag and drop a openfiledialog control to your form... and use the following code.. If OpenFileDialog1.ShowDialog() = DialogResult.OK Then System.Diagnostics.Process.Start(OpenFileDialog1.FileName) End If using this method... opens any file that is selected in their own program...and also a new window..

          Nab

          C Offline
          C Offline
          China Gary
          wrote on last edited by
          #4

          Thanks for the help!

          1 Reply Last reply
          0
          • J JustmeNick

            The answer you have gotton before is good but if you wanted to select a file and open that selected file..you could use this one also.. drag and drop a openfiledialog control to your form... and use the following code.. If OpenFileDialog1.ShowDialog() = DialogResult.OK Then System.Diagnostics.Process.Start(OpenFileDialog1.FileName) End If using this method... opens any file that is selected in their own program...and also a new window..

            Nab

            C Offline
            C Offline
            China Gary
            wrote on last edited by
            #5

            How do you select a specific folder?

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups