WordBasic Error 24 Using SetAttr Command

Last reviewed: August 4, 1997
Article ID: Q117400
6.00 6.00a WINDOWS kbusage kbmacro

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.

Kbcategory: kbusage kbmacro KBSubcategory:


Additional reference words: 6.00 6.00a GetAttr setattr archive word6
winword system
Version : 6.00 6.00a
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 4, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.