Y
Yavuz Bogazci
Hello, the following code selects recursively the Outlook folders and
shows these in a Treeview. Everything works nice. I have the following
problem:
I would like have a TreeNode a text and two more values assigned to
this TreeNode e.g. an UserID and a Text.
These two information should not be visible. But if a user selects the
TreeNode i would like to read the information of the selected
TreeNode.
How can I build that in the code below??? I read about Inheritance but
i dont know how to implement those thing in my code below. For your
assistance I would be very grateful.
Private Sub Button3_Click
' Dim Application As Outlook.Application
Dim root As TreeNode
TreeView1.Nodes.Clear()
root = TreeView1.Nodes.Add("Outlook Root")
AddChildren(root, oNS.Folders)
End Sub
Private Sub AddChildren(ByVal root As TreeNode, ByVal list As
Outlook.Folders)
Dim flr As Outlook.MAPIFolder
Dim newRoot As TreeNode
For Each flr In list
newRoot = root.Nodes.Add(flr.Name)
AddChildren(newRoot, flr.Folders)
Next flr
End Sub
thanks
yavuz bogazci
shows these in a Treeview. Everything works nice. I have the following
problem:
I would like have a TreeNode a text and two more values assigned to
this TreeNode e.g. an UserID and a Text.
These two information should not be visible. But if a user selects the
TreeNode i would like to read the information of the selected
TreeNode.
How can I build that in the code below??? I read about Inheritance but
i dont know how to implement those thing in my code below. For your
assistance I would be very grateful.
Private Sub Button3_Click
' Dim Application As Outlook.Application
Dim root As TreeNode
TreeView1.Nodes.Clear()
root = TreeView1.Nodes.Add("Outlook Root")
AddChildren(root, oNS.Folders)
End Sub
Private Sub AddChildren(ByVal root As TreeNode, ByVal list As
Outlook.Folders)
Dim flr As Outlook.MAPIFolder
Dim newRoot As TreeNode
For Each flr In list
newRoot = root.Nodes.Add(flr.Name)
AddChildren(newRoot, flr.Folders)
Next flr
End Sub
thanks
yavuz bogazci