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. C#
  4. Stop Word Application programmatically

Stop Word Application programmatically

Scheduled Pinned Locked Moved C#
question
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.
  • R Offline
    R Offline
    rikpak
    wrote on last edited by
    #1

    I have a process that starts and runs MS Word for about 10 seconds. Sometimes Word seems to hang; it stays open for 'ever'. Is there an way that I can run a process2 independently of process that checks to see if Word is running and if it is, if it has been open for about a minute, and if it has, to stop it? Thanks in advance.

    F 1 Reply Last reply
    0
    • R rikpak

      I have a process that starts and runs MS Word for about 10 seconds. Sometimes Word seems to hang; it stays open for 'ever'. Is there an way that I can run a process2 independently of process that checks to see if Word is running and if it is, if it has been open for about a minute, and if it has, to stop it? Thanks in advance.

      F Offline
      F Offline
      Fernando Soto
      wrote on last edited by
      #2

      You can do the following. Run the follong code to see if MS Word is running and if it is it will kill the process. using System.Diagnostics; private Process[] WordProcessList; ..... int index; WordProcessList = Process.GetProcessesByName("WINWORD"); for( index = 0; index < WordProcessList.Length; index++) { WordProcessList[index].Kill(); }

      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