WordBasic Error 24 Using SetAttr Command

ID: 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 <attribute> 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.


REFERENCES

"Microsoft Word Developer's Kit," pages 677-678

Microsoft Word for Windows online Help topic, "SetAttr"

NOTE: Attribute 4 is not documented under the SetAttr topic in online Help.

Additional query words: 6.00a GetAttr setattr archive word6 winword system

Keywords :
Version : WINDOWS:6.0,6.0a
Platform : WINDOWS
Issue type :


Last Reviewed: January 7, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.