Skip to Content
0
Jan 14, 2008 at 09:39 AM

Getting currently selected element of context node

27 Views

hi All

i hav another query for you regarding the manipulation of table.

how do v get the currentcontextelement since the node table refering to is at 3rd level e.g.

parent--

child1 --

-


child2---

-


attribute1

-


attribute2

now way m getting current value for attribute1 is as follwos

IWDNode parent=wdContext.nodeParent.currentParentNodeElement.node();

child1=parent.getchild("child1",parent.getLeadselection());

child2=child1.getchild("child2",parent.getLeadselection());

attribute1 = child2.getCurrentElement().getAttributeAsText("attribute1");

is there any other simpler way for this????

Thanks

Deeps