G
Geoff Edwards
Using Word 97:
I am creating tables "on the fly" from code as, when and where
required thus:
Set myTable = ActiveDocument.Tables.Add(Range:=Selection.Range, _
NumRows:=NumberOfRows, NumColumns:=3)
Is there any method whereby, after the table is created, I can give it
a name so that in future I can address it by name rather than by
number given that the number might change as new tables are inserted
between others?
Or aren't they renumbered? If not, how do I get the number of the
table I am currently in?
Or would this work (eg):
Set myDirectionsTable=ActiveDocument.Tables.Add _
(Range:=Selection.Range, _
NumRows:=NumberOfRows, NumColumns:=3)
And later:
Set myWarningsTable=ActiveDocument.Tables.Add _
(Range:=Selection.Range, _
NumRows:=NumberOfRows, NumColumns:=3)
and then use:
With myWarningsTable
as opposed to what I was trying to do ie:
With ActiveDocument.Tables("DirectionsTable")
Geoff Edwards
Leeds, UK
e-mail: (e-mail address removed)
(replace the stopspambot bit with some
version of my name)
I am creating tables "on the fly" from code as, when and where
required thus:
Set myTable = ActiveDocument.Tables.Add(Range:=Selection.Range, _
NumRows:=NumberOfRows, NumColumns:=3)
Is there any method whereby, after the table is created, I can give it
a name so that in future I can address it by name rather than by
number given that the number might change as new tables are inserted
between others?
Or aren't they renumbered? If not, how do I get the number of the
table I am currently in?
Or would this work (eg):
Set myDirectionsTable=ActiveDocument.Tables.Add _
(Range:=Selection.Range, _
NumRows:=NumberOfRows, NumColumns:=3)
And later:
Set myWarningsTable=ActiveDocument.Tables.Add _
(Range:=Selection.Range, _
NumRows:=NumberOfRows, NumColumns:=3)
and then use:
With myWarningsTable
as opposed to what I was trying to do ie:
With ActiveDocument.Tables("DirectionsTable")
Geoff Edwards
Leeds, UK
e-mail: (e-mail address removed)
(replace the stopspambot bit with some
version of my name)