![]() |
|
#1
|
|||
|
|||
![]() Hi All tables, by default, are numbered in MS Word. For example the first table is Table1, the second Table2 etc. So in your code you could put the following line of code before you sort your table: Selection.GoTo What:=wdGoToTable, Which:=wdGoToFirst, Count:=3, Name:="" This would take you to Table3 in the document. Hope this helps. Good luck. Tony(OTPM) |
#2
|
|||
|
|||
![]()
Thanks.
This will help, however I there might be a problem if at a later stage adding a table above the one I have specified. The document where the macro is going to be added to is a template and will be used by a number of users not capable of updating any macros. Is it possible to actually fix the name of the selected table? Also another question; is it possible to add a macro to a "button" in the document. This could for instance be a text box like is possible in excel. If nothing og the requested is possible I will probably go with the solution suggested. Thanks again! |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
tswiers | Excel Programming | 2 | 08-11-2011 02:40 AM |
![]() |
Bahir Barak | Word | 2 | 01-20-2011 01:52 PM |
Can I sort a Pivot table by subtotals? | oshkosh | Excel | 1 | 12-07-2010 06:20 PM |
Sort Macros | boutells | Excel | 1 | 07-16-2009 11:48 AM |
Sort Range | boutells | Excel | 1 | 07-15-2009 03:02 AM |