View Single Post
  #2  
Old January 17th 06, 12:26 AM posted to microsoft.public.outlook.program_forms
Wolfram Jahn
external usenet poster
 
Posts: 12
Default How con I add Nodes to my TreeView in OL2003 Forms (VBS)

HelixX23 wrote:

Hi...
I´d like to add a treeview Element to my Outlook Form.

Can enyone give me an example...?

In VBA this wokrs fine...


Assuming you already have a treeview control named "TreeView1" on your
form page named "P.1"

sub tvtest
dim pgs,tv,i
set pgs = Item.GetInspector.ModifiedFormPages
set tv = pgs("P.1").controls("TreeView1")
for i = 1 to 3 ' e.g.
tv.nodes.add "Node " & i
next ' i
end sub


More treeview info at
http://msdn.microsoft.com/library/de...iewcontrol.asp

Make sure to use numbers instead of vba constants (4 instead of
tvwChild). VBS does not know vba constants.


HTH, Wolfram
Ads