Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
Table refresh / referencing from VBA
Just wondering how to get the reference to the table the insertion point is
in from VBA when a macro is called. I've got around table refresh by forcing a refresh of all cells in the current doc: Sub RefreshAllTables() Dim tbTemp As Table Dim cellTemp As Cell For Each tbTemp In ActiveDocument.Tables For Each cellTemp In tbTemp.Range.Cells cellTemp.Range.Fields.Update Next Next End Sub This was fine for a while, but its getting a bit slow now the doc has grown (and its a nasty fix, whereas I'd like an elegant one). If I could get a refernce for the table that the insertion point was in, I could have a macro just to recalc that table. Now I think of it, it might be better just to force a refresh of only the calculation cells in all the tables ... I'm a bit new to Word VBA. I'm using Word XP/2002. |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
Table refresh / referencing from VBA
Hi ?B?Q0ogQnJvd24=?=,
Just wondering how to get the reference to the table the insertion point is in from VBA when a macro is called. I've got around table refresh by forcing a refresh of all cells in the current doc: Set tbTemp = Selection.Tables(1) Sub RefreshAllTables() Dim tbTemp As Table Dim cellTemp As Cell For Each tbTemp In ActiveDocument.Tables For Each cellTemp In tbTemp.Range.Cells cellTemp.Range.Fields.Update Next Next End Sub Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
20x20 multiplication table | Tables | |||
Populate Table from Access | Mailmerge | |||
Table Format Style vs. Table Text Style | Page Layout | |||
Row height problem with table in table | Tables | |||
Getting the format of a table | Tables |