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. avoid Word to appear hung up

avoid Word to appear hung up

Scheduled Pinned Locked Moved Visual Basic
questionhelp
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.
  • S Offline
    S Offline
    Stephan Wright
    wrote on last edited by
    #1

    Hy everyone! I do have a macro on a quit long document (several 100 pages), which searches this document quit often before it is finished. So this could take quit long until it is done. When I do leave Word during the macro is running, I am not able to get back e.g. to have a look when it might be ready or to have a look into what is displayed in the statusbar. I do show status informations in the status bar. I thought this would avoid Word to appear hung up because of changing the contains, but it didn't. Same problem when the screensaver starts. What I want to do is the following: Allow to leave the Word window and reenter it at any time, as if I never left it. Is there any chance to avoid Word to appear hung up when the macro is running and I left the window? Or do I have to wait until the macro is ready to enter the window again? Because I do want to be able to have a look at the statusbar at any time to see the status of the macro and switch windows meanwhile. I would like to integrate this into my existing VBA for Word macro! Thanks for any idea! Stephan.

    D 1 Reply Last reply
    0
    • S Stephan Wright

      Hy everyone! I do have a macro on a quit long document (several 100 pages), which searches this document quit often before it is finished. So this could take quit long until it is done. When I do leave Word during the macro is running, I am not able to get back e.g. to have a look when it might be ready or to have a look into what is displayed in the statusbar. I do show status informations in the status bar. I thought this would avoid Word to appear hung up because of changing the contains, but it didn't. Same problem when the screensaver starts. What I want to do is the following: Allow to leave the Word window and reenter it at any time, as if I never left it. Is there any chance to avoid Word to appear hung up when the macro is running and I left the window? Or do I have to wait until the macro is ready to enter the window again? Because I do want to be able to have a look at the statusbar at any time to see the status of the macro and switch windows meanwhile. I would like to integrate this into my existing VBA for Word macro! Thanks for any idea! Stephan.

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

      Yuo can call DoEvents() every once in a while to let Word process its WM_PAINT events. But, if your code is blocked on a long-running Search statement, this won't do you any good. If your code is blocked, your code is hung and so is Word, waiting for the statement to complete. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      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