I have a list to keep Text Items with special tag i have assigned to when calling AddNLTag. When I need to update the Item text, i will loop through my list and update item text one follow by another.
I tried, rve.SetItemText(rve.GetItemNo(TextItem), 'updated text'), but items in table cell does not seems to be working.
What is the best way to update Item's Text?
Thanks.
How to setItemText for an Item
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: How to setItemText for an Item
Items in table cells cannot be accessed as rve.GetItem(). They belong to items of a cell, not of the root document.
You need to store two values: ItemNo and RVData.
For the root document, RVData = rve.RVData
For cell, RVData = Cell.
Code for changing cell:
RVData.GetRVData.SetItemText(ItemNo, 'updated text');
You need to store two values: ItemNo and RVData.
For the root document, RVData = rve.RVData
For cell, RVData = Cell.
Code for changing cell:
RVData.GetRVData.SetItemText(ItemNo, 'updated text');