Microsoft KB Archive/117400

{|
 * width="100%"|

WordBasic Error 24 Using SetAttr Command

 * }

Q117400

-

The information in this article applies to:


 * Microsoft Word for Windows, versions 6.0, 6.0a

-

SYMPTOMS
When you run a macro that contains the WordBasic SetAttr command, you receive the following error:

WordBasic Err 24

Bad Parameter

CAUSE
This error occurs when your argument is additive and contains a combination of 32 (Archive) and 4 (System). For example, any of the following lines will cause this error.

  Example                      Combination that causes the error ---                     -   SetAttr "test.doc", 36       32 (Archive) + 4 (System) SetAttr "test.doc", 37      32 + 4 + 1 (Read Only) SetAttr "test.doc", 38      32 + 4 + 2 (Hidden) SetAttr "test.doc", 39      32 + 4 + 1 + 2

STATUS
Microsoft is researching this problem, and we will post new information here in the Microsoft Knowledge Base as it becomes available.

WORKAROUND
Set the Archive and System attributes independently in two separate SetAttr commands--one to apply attribute 4, and the other to apply attribute 32. Any remaining attributes you want to apply can be added to either of the two SetAttr command lines.