Results 1 to 2 of 2
2002-06-19, 02:33 #1
- Join Date
- Jan 2001
- Christchurch, New Zealand
- 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.
2002-06-19, 05:19 #2
- Join Date
- Feb 2001
- Silicon Valley, USA
- Thanked 94 Times in 90 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
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?