![]() |
|
#1
|
|||
|
|||
|
I'm trying to develop a script to select an entire table in Word, but only if the insertion point (cursor) is within the table. If the insertion point is NOT within a table, I want the script to signal an error.
I have a working prototype, but it's not quite right. The code selects just one column, not the entire table. Sub SelectThisTable() On Error GoTo ErrorHandler Selection.SelectColumn ' Do something with the selected table Exit Sub ErrorHandler: MsgBox "Not in a table" End Sub |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to Select All or Part of a Table in Word
|
jeffreybrown | Word VBA | 2 | 09-03-2018 08:23 PM |
| Looking to copy select cells in table using dropdown list to paste to new table in another worksheet | CaptainRetired | Excel Programming | 18 | 01-04-2018 07:22 PM |
| VBA Word Table - Select More than 1 Column at a time - Apply Formatting | jc491 | Word VBA | 12 | 09-24-2015 06:03 AM |
Can't select a cell in my table
|
dilorenzoc | Word Tables | 1 | 06-03-2015 05:56 AM |
Select Text in Table but Table Gets Selected Too
|
RBusiness | Word | 1 | 06-07-2011 04:26 PM |