Message 1 of 4
Change the active row of the iPart table using iLogic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have written a code that adds a new row the iPart table with a new length. I have simplified it for this post. How do I get the script to make the new row active? Here is what I have written:
Dim oFactoryDoc As PartDocument oFactoryDoc = ThisApplication.ActiveDocument Dim oPartFactory As iPartFactory oPartFactory = oFactoryDoc.ComponentDefinition.iPartFactory oWS = oPartFactory.ExcelWorkSheet oWS.Cells(5, 1) = "this is member 5" 'Member name oWS.Cells(5, 2) = "this is member 5" 'Part name oWS.Cells(5, 3) = 30 'Length oWS.Parent.Save oWS.Parent.Close 'Here I want to change the active row to the new row I've just created, how do i do this? I think it's something along these lines? iPartMember.ChangeRow(5)
I have read the iPartMember.ChangeRow page and it says the first argument is NewRow which can be a RowIndex, which in this case should be 5? And the second argument is for custom entry which I've left blank as it's optional. I get this error when I try to run the code:
How do I get it to change to the new row?
Thanks,
Harvey