WD97: Error Recording Opening Template with WordBasic Macros

Last reviewed: August 27, 1997
Article ID: Q157624
The information in this article applies to:
  • Microsoft Word 97 for Windows

SYMPTOMS

While recording a Visual Basic macro in Word 97, you will receive the following error attempting to open a template containing a WordBasic macro:

     Word cannot open files containing WordBasic macros while macro
     recording. Stop macro recording and try again.

CAUSE

WordBasic macros cannot be converted to Visual Basic for Applications while the Visual Basic macro recorder is recording.

WORKAROUND

Method 1: Stop recording, open the file to automatically convert the

          WordBasic macros. Save the template in Word 97 format then
          record the macro using the newly converted template.

Method 2: If opening the template using the Open command on the File menu,
          add the following line to the appropriate place in your macro:

             Documents.Open FileName:="<path>/<filename>"

          or, if opening the template using the New command on the File
          menu:

            Documents.Add Template:="<path>/<filename>",
NewTemplate:=False

         where <path>/<filename> is the full path and file name of
         the file you want to open.


KBCategory: kbusage
KBSubcategory:
Additional query words: vbe word97
Keywords : kbualink97 PgmOthr
Version : 97
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 27, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.