Microsoft KB Archive/140098

{|
 * width="100%"|

WordBasic Err=509 Using Word 7.0 Macros in Word 6.0

 * }

Q140098

-

The information in this article applies to:


 * Microsoft Word for Windows, 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.

Additional query words: 6.0 7.0 macword winword word basic wordbasic error errmsg word7

Keywords : kbinterop

Issue type :

Technology :