Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Christchurch, New Zealand
    Posts
    250
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Error Handling problems (Word 2000)

    We are having problems with the error handling in the attached form. On one pc, running Word 2000 (9.0.2720) on Windows XP it works fine. On another pc, running Word 2000 (9.0.3821 SR-1) on Windows 2000 the error handler doesn't work.

    The code is trying to write to the builtin and custom document properties. It uses the same code for both types. In the first pass through the routine there should be an error because a built-in doc property doesn't exist - the error handler on one pc however doesn't kick in and the routine breaks down.

    Does anyone know whether operating system, or Word version can affect error handling?

    We're at our wits end - something so simple (we thought!)

    If we can't get the error handler to work in the way we envisage, we'll split the code into two parts, one for the built in doc properties and one for the custom doc properties.
    Attached Files Attached Files

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Error Handling problems (Word 2000)

    I have Office 2000 SR-1 on Windows 2000 and it works fine for me. Maybe try these minor housekeeping things:

    (1) In Private Sub cmdSave_Click() delete

    Call WriteProp(strPropName, strValue)

    This is trying to add a property with a blank name, and the way it goes through the function is definitely not good.

    (2) Place an Exit Sub before

    ErrHandlerWriteProp:

    If these don't help, try resetting error handling (On Error Goto 0) when exiting the Public Subs and Functions. Maybe something about being Public causes error handling to slop over into other routines?

Posting Permissions

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