WordBasic Err=509 Using Word 7.0 Macros in Word 6.0

Last reviewed: February 5, 1998
Article ID: Q140098
The information in this article applies to:
  • Microsoft Word for Windows 95, version 7.0
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for the Macintosh, versions 6.0, 6.0.1

SYMPTOMS

In Word 6.0, you get the following error message when you run a macro that was created in Word 7.0:

   WordBasic Err=509
   This command is not available.

CAUSE

The converted macro contains an "Unrecognized_Statement" line. This can occur when you create a macro in Word 7.0 that contains either the EditClear command or the Help command. When you open the template that contains the macro in Word 6.0, the macro converts incorrectly. For example, if you write this macro in Word 7.0

   Sub MAIN
   Insert "Starting Help"
   EditClear
   Help
   End Sub

the macro will convert to this in Word 6.0:

   Sub Main
   Insert "Starting Help"
   Unrecognized_Statement49170
   Unrecognized_Statement794
   End Sub

This problem does not occur when converting other WordBasic commands.

STATUS

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

WORKAROUND

If you intend to use your macro in Word 6.0, use one of the following workarounds:

Method 1: Create the macro using Word 6.0.

Method 2: Use the WW6_EditClear command instead of EditClear. Or, use one

          of the specific Help statements or functions, such as
          HelpContents or HelpIndex instead of the Help command.

For more information about WordBasic commands in Word for Windows 95, open the Windows Help Topics Index, select the Index tab, and see the "WordBasic, Statements and Functions by Category" topic.


KBCategory: kbmacro kberrmsg
KBSubcategory:
Additional reference words: 6.0 6.0a 6.0c 7.0 macword winword word
basic wordbasic error errmsg word7
Keywords : kbinterop kberrmsg kbmacro
Version : 6.0 6.0a 6.0c 7.0 | 6.0 6.0
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: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.