Altova XMLSpy 2024 Enterprise Edition

Method: DuplicateRow() as Boolean



If the beginning of the range is inside a dynamic table, this method inserts a duplicate of the current row after the selected one. The selection of the range gets modified to point to the beginning of the new row. The function returns true if the duplicate operation was successful, otherwise false.




The authentic range object, or its related view object is no longer valid.


Invalid address for the return parameter was specified.



' ---------------------------------------------------------

' Scripting environment - VBScript

' duplicate row in current dynamically growable table

' ---------------------------------------------------------

Dim objRange

' we assume that the active document is open in authentic view mode

Set objRange = Application.ActiveDocument.AuthenticView.Selection


' check if we can insert something

If objRange.IsInDynamicTable Then


 ' objRange points to beginning of new row


End If

© 2018-2024 Altova GmbH