WD: ShowVars Command Doesn't Display Array Variables

Last reviewed: February 10, 1998
Article ID: Q81863
The information in this article applies to:
  • Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, version 7.0
  • Word for the Macintosh, versions 6.0, 6.0.1

SYMPTOMS

In Microsoft Word, the WordBasic command ShowVars does not display numeric or string-array variables. It displays only single- value-numeric or string variables.

WORKAROUND

The following word Basic code segment illustrates how to view the content of an array while the macro is running.

   dim num(100)
   dim alpha(100)

   msgbox "the cell you want to see" + Str$(num(x))
   MsgBox "the cell you want to see" + alpha(x)

   Where x is the number of the cell of interest. For small array it may be
   feasible to use a For Next loop to view the contents of the entire
   array.

STATUS

This is by product design.

REFERENCES

"Using WordBasic," by WexTech Systems and Microsoft, page 98

"Microsoft Word for Windows and OS/2 Technical Reference," page 260

"Microsoft Word for Windows User's Reference," version 1.x, pages 185-189

"Microsoft Word for Windows User's Guide," version 2.0, pages 763-792


Additional query words: macword variable variables winword winword2 word6
word7 word95
Keywords : macword winword word6 word7 word95 kbmacro kbusage
Version : WINDOWS: 2.x, 6.0, 6.0a, 6.0c, 7.0; MACINTOSH: 6.x
Issue type : kbbug


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 10, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.