WD: Macro to Determine If Insertion Point Is in a TableLast reviewed: February 16, 1998Article ID: Q83730 |
The information in this article applies to:
SUMMARYWhen you write a macro in WordBasic, you may need to know whether the insertion point is positioned within a Word for Windows table. The sample macros in the "More Information" section of this article display a message box stating whether the insertion point is within a Word for Windows table.
MORE INFORMATIONWARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This example uses the SelInfo command to determine if the insertion point is within a table. This command is not available in Word for Windows version 1.x.
Sub MAIN n = SelInfo(12) If n = -1 Then MsgBox "Cursor is in a table" Else MsgBox "Cursor is not in a table" End If End Sub SYNTAXn = SelInfo(Type) The SelInfo() command returns various types of information about the current selection. There are 30 different arguments (types) for the SelInfo command. Type number 12 returns -1 if the selection is within a table.
REFERENCES"Using WordBasic," by WexTech Systems and Microsoft, page 277-278
|
Additional query words:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |