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
  1. Home
  2. General Programming
  3. Visual Basic
  4. One more Help Please!!

One more Help Please!!

Scheduled Pinned Locked Moved Visual Basic
linuxhelptutorial
7 Posts 4 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.
  • H Offline
    H Offline
    Het2109
    wrote on last edited by
    #1

    Hi I want to open any document without the .exe file to open it. Example. If I using shell("c:\program files\microsoft office\office\winword.exe c:\temp\mydoc.doc") I dont't wanna that. How i can only put Shell("c:\temp\mydoc.doc") or other command to open it. :)Be Humble in Victory and Strong in Defeat.:) -Het

    J N G 3 Replies Last reply
    0
    • H Het2109

      Hi I want to open any document without the .exe file to open it. Example. If I using shell("c:\program files\microsoft office\office\winword.exe c:\temp\mydoc.doc") I dont't wanna that. How i can only put Shell("c:\temp\mydoc.doc") or other command to open it. :)Be Humble in Victory and Strong in Defeat.:) -Het

      J Offline
      J Offline
      Jblake00
      wrote on last edited by
      #2

      I am not sure what you mean. But if you are trying to read a text file with a useing visual basic. You would do something like this. Dim my As IO.StreamReader Dim fileInfo As string Then something like my = IO.File.OpenText("A:grades.txt") fileInfo = my.ReadFileToEnd

      1 Reply Last reply
      0
      • H Het2109

        Hi I want to open any document without the .exe file to open it. Example. If I using shell("c:\program files\microsoft office\office\winword.exe c:\temp\mydoc.doc") I dont't wanna that. How i can only put Shell("c:\temp\mydoc.doc") or other command to open it. :)Be Humble in Victory and Strong in Defeat.:) -Het

        N Offline
        N Offline
        Niels Penneman
        wrote on last edited by
        #3

        using ShellExecute (API)... I already posted this before, search the forum for "ShellExecute" :-) greetz ;-) *Niels Penneman*


        Software/Dev Site
        Personal Site


        H 1 Reply Last reply
        0
        • H Het2109

          Hi I want to open any document without the .exe file to open it. Example. If I using shell("c:\program files\microsoft office\office\winword.exe c:\temp\mydoc.doc") I dont't wanna that. How i can only put Shell("c:\temp\mydoc.doc") or other command to open it. :)Be Humble in Victory and Strong in Defeat.:) -Het

          G Offline
          G Offline
          Guillermo Rivero
          wrote on last edited by
          #4

          Process.Start("c:\temp\mydoc.doc") Free your mind...

          H 1 Reply Last reply
          0
          • G Guillermo Rivero

            Process.Start("c:\temp\mydoc.doc") Free your mind...

            H Offline
            H Offline
            Het2109
            wrote on last edited by
            #5

            Thanks for the reply man its working great. just wanted to ask if the program associated with the document or file doesn't exist then? we have to catch the exception or is there any other way to out. But thanks again for solving out, man. :)Be Humble in Victory and Strong in Defeat.:) -Het

            G 1 Reply Last reply
            0
            • N Niels Penneman

              using ShellExecute (API)... I already posted this before, search the forum for "ShellExecute" :-) greetz ;-) *Niels Penneman*


              Software/Dev Site
              Personal Site


              H Offline
              H Offline
              Het2109
              wrote on last edited by
              #6

              Niel i couldnt find it at the link given by u, but will still look for it, through that way, but it is working through process.start("path\name of document"). Thanks for helping me out to all :)Be Humble in Victory and Strong in Defeat.:) -Het

              1 Reply Last reply
              0
              • H Het2109

                Thanks for the reply man its working great. just wanted to ask if the program associated with the document or file doesn't exist then? we have to catch the exception or is there any other way to out. But thanks again for solving out, man. :)Be Humble in Victory and Strong in Defeat.:) -Het

                G Offline
                G Offline
                Guillermo Rivero
                wrote on last edited by
                #7

                Never thought of that. But I'll check what could you do. :) Free your mind...

                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