G
George Lee
Adding Tables or rows to tables always jumps to the insert point. Although
most of the time this is not a problem, there are instances that I use range
rather than Selection to insert material into a file. In those cases, Add
always jumps to one location and ScrollIntoView jumps to another and it looks
awful.
Is there a way to prevent jumping to the insert point?
As a sample:
'table already defined
For Each myRevision In theSource.Revisions
theCount = theCount + 1
targetDoc.Tables(1).Rows.Add
With targetDoc.Tables(1)
.Cell(Row:=theCount + 1, Column:=1).Range.InsertAfter
Text:=theCount
'and other stuff
End With
targetDoc.Windows(1).ScrollIntoView targetDoc.Tables(1).Cell _
(Row:=theCount + 1, Column:=1).Range, False
Next
most of the time this is not a problem, there are instances that I use range
rather than Selection to insert material into a file. In those cases, Add
always jumps to one location and ScrollIntoView jumps to another and it looks
awful.
Is there a way to prevent jumping to the insert point?
As a sample:
'table already defined
For Each myRevision In theSource.Revisions
theCount = theCount + 1
targetDoc.Tables(1).Rows.Add
With targetDoc.Tables(1)
.Cell(Row:=theCount + 1, Column:=1).Range.InsertAfter
Text:=theCount
'and other stuff
End With
targetDoc.Windows(1).ScrollIntoView targetDoc.Tables(1).Cell _
(Row:=theCount + 1, Column:=1).Range, False
Next