B
Beeawwb
Hi everyone,
I've been finishing up the project I'm working on, and I sent it to be
tested by one of my colleagues. A little background, previously we identified
that documents which had password protection would not work with our macro.
If the document was just protected everything would work fine. Example:
Select Case oDoc.ProtectionType
Case wdNoProtection
GoTo InitDoc
End Select
oDoc.Unprotect
If oDoc.Unprotect failed, it would generate error 5485, which was easy to
trap for. However, in my most recent code, all errors are now reported as
"0", so my error trapping (If Err.Number = 5485 Then ... ) no longer works.
I'm not doing anything special that I can see, I say "On Error goto
ErrorCatch" at the beginning of my code, and ErrorCatch is just the "Iff
Then" listed above.
Some things to note which may be of interest, I call other routines from
WhichLetterheadLoad(), but none of these are called before the
oDoc.Unprotect, apart from a Class module LogIt. LogIt has its own error
handling.
Thanks for your help on this confusing situation!
-Bob
I've been finishing up the project I'm working on, and I sent it to be
tested by one of my colleagues. A little background, previously we identified
that documents which had password protection would not work with our macro.
If the document was just protected everything would work fine. Example:
Select Case oDoc.ProtectionType
Case wdNoProtection
GoTo InitDoc
End Select
oDoc.Unprotect
If oDoc.Unprotect failed, it would generate error 5485, which was easy to
trap for. However, in my most recent code, all errors are now reported as
"0", so my error trapping (If Err.Number = 5485 Then ... ) no longer works.
I'm not doing anything special that I can see, I say "On Error goto
ErrorCatch" at the beginning of my code, and ErrorCatch is just the "Iff
Then" listed above.
Some things to note which may be of interest, I call other routines from
WhichLetterheadLoad(), but none of these are called before the
oDoc.Unprotect, apart from a Class module LogIt. LogIt has its own error
handling.
Thanks for your help on this confusing situation!
-Bob