WordBasic Error 24 Using SetAttr Command

ID: Q117400

6.00 6.00a WINDOWS kbusage kbmacro

The information in this article applies to:

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.

Kbcategory: kbusage kbmacro KBSubcategory: Additional reference words: 6.00 6.00a GetAttr setattr archive word6 winword system

Version           : 6.00 6.00a
Platform          : WINDOWS

Last Reviewed: August 4, 1997