P
Peter
I am developing a VBA program to process a number of tables in a word
document by sorting each table then transferring the contents of each sorted
table to a new table (with changed layout) in another document.
My code successfully sorts the tables in the source document, and adds the
first new table in the new document Ok, but all subsequent new tables appear
to be added as nested within the first table of the new document because my
insertion point appears to remain with the range of the first table.
How do I programmatically change the Range Selection/Insertion point each
time to go to a new point outside the end of the last table inserted so that
when I do a Tables.Add statement it inserts the next table as a completely
new table following the previous one? I have tried adding code:
Selection.MoveDown Unit:=wdLine, Count =1 , but this appears to just
extend the existing range of the current table.
document by sorting each table then transferring the contents of each sorted
table to a new table (with changed layout) in another document.
My code successfully sorts the tables in the source document, and adds the
first new table in the new document Ok, but all subsequent new tables appear
to be added as nested within the first table of the new document because my
insertion point appears to remain with the range of the first table.
How do I programmatically change the Range Selection/Insertion point each
time to go to a new point outside the end of the last table inserted so that
when I do a Tables.Add statement it inserts the next table as a completely
new table following the previous one? I have tried adding code:
Selection.MoveDown Unit:=wdLine, Count =1 , but this appears to just
extend the existing range of the current table.