I did as you suggested-ocell.range.select but it made no difference. I have
deleted the second table and created another just for test and the same
thing happens. I not sure of track changes. I checked
document.trackrevisions and it is false.
When it does halt at the error, I can go back to the document and see that
under the edit command, that all the paste commands are greyed out. So why
this happens is still a mystery
Jack
In Word2003/2007, the cell could be protected. But since it happens with a
newly created table too, that seems out of the question.
I'd have offered that you mail me the document, but if it happens with a new
table, it probably also happens with a new document?
I'm fresh out of ideas, and hope somebody else will jump in.
:-( Klaus
>I did as you suggested-ocell.range.select but it made no difference. I
>have deleted the second table and created another just for test and the
[quoted text clipped - 48 lines]
>>> Any suggestions?
>>> Jack
Jack - 08 Jan 2007 01:13 GMT
I never got my original code to work but I did change to the following code
and it works correctly.
It is still a puzzle to me while the original code did not work
Jack
New Code:
ActiveDocument.Tables(6).select
Selection.Copy
For it = 1 To 5
iSubCount = 0
ActiveDocument.Tables(it).Range.Cells(1).range.select
do while isubcount<2
IF selection.Text = Chr(13) & Chr(7) Then
'Cell is empty, store subtable
iSubCount = iSubCount + 1
selection.pasteAsNestedTable
End If
selection.moveright unit:=wdcell
loop
next it
> In Word2003/2007, the cell could be protected. But since it happens with a
> newly created table too, that seems out of the question.
[quoted text clipped - 57 lines]
>>>> Any suggestions?
>>>> Jack