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. how run msword 2003 in vb.net

how run msword 2003 in vb.net

Scheduled Pinned Locked Moved Visual Basic
helpcsharplinuxtutorial
2 Posts 2 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.
  • N Offline
    N Offline
    neo_bags
    wrote on last edited by
    #1

    hello guys my main problem of my application is that i cannot the load the file which is from ms word 2003..ok to be more understandable first i have a textbox that will get the path of the file like for example "c;\sample.doc" then i have button there that will show the msword.exe the problem is that it doesnt work...can you fix this code... ..Private Sub btnshowfile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnshowfile.Click Dim fLocation As String = txtfilelocation.Text Dim fType As String Dim iOpen As Integer If txtfilelocation.Text = fLocation Then End If fType = Mid(fLocation, Len(fLocation) - 2, 3) Select Case fType Case "DOC", "doc" iOpen = Shell("C:\Program Files\Microsoft Office\Office10\winword.exe " & Chr(34) & fLocation & Chr(34), AppWinStyle.NormalFocus) end select end sub.. thats my code...it doesnt load anything in 2003 office please help.... thanks in advance

    C 1 Reply Last reply
    0
    • N neo_bags

      hello guys my main problem of my application is that i cannot the load the file which is from ms word 2003..ok to be more understandable first i have a textbox that will get the path of the file like for example "c;\sample.doc" then i have button there that will show the msword.exe the problem is that it doesnt work...can you fix this code... ..Private Sub btnshowfile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnshowfile.Click Dim fLocation As String = txtfilelocation.Text Dim fType As String Dim iOpen As Integer If txtfilelocation.Text = fLocation Then End If fType = Mid(fLocation, Len(fLocation) - 2, 3) Select Case fType Case "DOC", "doc" iOpen = Shell("C:\Program Files\Microsoft Office\Office10\winword.exe " & Chr(34) & fLocation & Chr(34), AppWinStyle.NormalFocus) end select end sub.. thats my code...it doesnt load anything in 2003 office please help.... thanks in advance

      C Offline
      C Offline
      Chatura Dilan
      wrote on last edited by
      #2

      This is one of easy ways:) You can open files with there associated applications like this System.Diagnostics.Process.Start("C:\YourFile.doc")

      Chatura Dilan SC Java Programmer

      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