Microsoft KB Archive/121293

{|
 * width="100%"|

WD6X: Mac WordBasic Commands Deleted in Word 6.0 for Windows

 * }

Q121293

-

The information in this article applies to:


 * Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
 * Microsoft Word for the Macintosh, versions 6.0, 6.0.1

-

SUMMARY
Microsoft WordBasic commands that are specific to Microsoft Word 6.x for the Macintosh are deleted from a macro when you edit and save the macro in Word 6.0 or 6.0a for Windows.

Word 6.0c does not delete unknown commands from your macros when you edit them in Word 6.0c for Windows. Instead of deleting the Macintosh-specific command, Word 6.0c replaces Macintosh commands with an "Unrecognized_Command" string or token.

MORE INFORMATION
If you create a macro on the Macintosh platform and copy the template that contains the macro to Word 6.0 or 6.0a for Windows, the Macintosh-specific WordBasic commands are permanently removed from the macro if you edit and save the macro in Word 6.0 or 6.0a for Windows. The Macintosh commands are not restored when you transfer the macro back to the Macintosh platform. As a result, the macro does not run correctly when transferred back to the Macintosh platform.

If the macro is transferred to Word 6.0c for Windows, the Macintosh- specific commands are not deleted. Word 6.0c will display "Unrecognized_Statement" in place of the Macintosh commands. The Macintosh WordBasic commands are not deleted when you edit and save the macro in Word 6.0c for Windows.

Examples
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please see the following page on the World Wide Web:

"http://www.microsoft.com/partner/referral/" For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

"http://support.microsoft.com/directory/overview.asp" Editing and Saving the Macro in Word for Windows 6.0, 6.0a:

The following Macintosh Word 6.0 sample macro contains a Macintosh-specific function named MacID$.

  Sub MAIN a$ = MacID$("TEXT") End Sub. If you open, edit, and save changes to the above cross-platform macro in Word 6.0 or 6.0a for Windows, the macro appears as shown below when re- opened in Word 6.0 for the Macintosh:

  Sub MAIN a$ = ("TEXT") End Sub NOTE: The Macintosh-specific command, MacID$, was deleted.

Editing and Saving the Macro in Word for Windows 6.0c:

If you create the following macro in Word 6.0 for the Macintosh

  Sub Main a$ = MacID$("TEXT") End Sub and open the template that contains the macro in Word 6.0c for Windows, the macro appears as follows:

  Sub Main a$ = Unrecognized_Statement33134("TEXT") End Sub The "33134" number is the token identification number for the "MacID$" command. Word 6.0c for Windows does not delete any unrecognized Macintosh WordBasic commands.

NOTE: If you transfer the template that contains the macro back to Macintosh Word 6.0, you must "dirty" the macro in Word for the Macintosh. In other words, you must open the macro in Macintosh Word, make a small change such as adding a space, and save the macro. This action changes the token IDs back to the Macintosh-specific WordBasic commands, such as MacID$. "Dirtying" the macro in Macintosh Word (that is, editing and saving the macro in Macintosh Word) is necessary only once. Ideally, you should dirty the macro once before distributing the macro to other Macintosh Word users.

Additional query words: recognize cross platform

Keywords : kbmacro kbprg kbdtacode kbmacroexample macword word6

Issue type : kbinfo

Technology : kbWordSearch kbWordWSearch kbWordMSearch