Newdoc. Range (newdoc. Range. End - 1, newdoc. Range. The End - 1). Paste
Always show invalid
But by the statement debugging can be run
Dim newdoc As Document, sredoc As Document, mytable As Table, RNG As Range
The Set newdoc=Documents. The Add
The Set sredoc=ThisDocument
For Each mytable In sredoc. Tables
The Set of RNG=mytable. Range
RNG. Copy
Newdoc. Range (newdoc. Range. End - 1, newdoc. Range. The End - 1). The InsertParagraph
Newdoc. Range (newdoc. Range. End - 1, newdoc. Range. The End - 1). Paste
Next mytable
Newdoc. SaveAs "E: \ VBA \ data \ word - VBA operation \ new table collection"
Next mytable
Newdoc. SaveAs "E: \ VBA \ data \ word - VBA operation \ new table collection"
End Sub
CodePudding user response:
Paste before invoking add:DoEvents
If not, in the loop is inserted between each statement DoEvents;
CodePudding user response:
I tried it on and test on my side is no problemCodePudding user response: