Results 1 to 3 of 3

Thread: Handle Word object hang ups.

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2019
    Posts
    4

    Handle Word object hang ups.

    I am processing a large amount of word documents. There will be some that hang due to corruption when calling, wdDoc = GetObject(wdFileName). Since word hangs the code hangs at that step. There is no error that the code can see, so on error resume next doesn't work. How can I skip that file, kill the WinWord process, and continue processing the rest of the documents?

  2. #2
    Hyperactive Member
    Join Date
    Oct 2018
    Posts
    276

    Re: Handle Word object hang ups.

    Use md5 algorithm to calculate hash of each file, store it separately, and skip the files that match the hash (corrupted files).

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2019
    Posts
    4

    Re: Handle Word object hang ups.

    The word documents don't become corrupt, they are stored with errors. There must be a way to timeout if the getObject call takes too long.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width