Setting up and Using TreeView Control in PowerPoint

Setting up and Using TreeView Control in PowerPoint

Post by SmFtZXMgQm » Fri, 29 Sep 2006 23:37:03


Hello all.

I create a lot of PPTs for my own business often with a large quantity of
links to documents i.e. pdfs so that I don't have to have all the information
on the slides. Sometimes, my presentations can contain links to many
different files and folders.

I have developed a VBA based routine to automate the building of the PPTs
via MS Access like this: the user opens the db, points the a folder dialogue
to the correct directory and then it populates the db before creating a
presentation based around a master slide. It creates buttons allowing a user
to display the correct file during the slideshow and navigate to different
slides. I am very happy with this but would like to extend its functionality
with a treeview.

In theory, I would like a treeview control on each slide allowing the user
to navigate backwards, forwards and to jump to any particular file in a
similar way to the Folders pane in Windows Explorer. I would like the
treeview to be visible on all slides and the expanded nodes to reflect the
current slide and file accessed. This would eliminate the need to follow a
linear route through the slideslow.

Through research on the web, I know who to work with the TreeView in VBA and
on WinForms but I do not know how to :

a) add the treeview to the pp slide
b) make the treeview appear on every slide so that the user can always see
where in the file structure they are.

I thought that it may be a case of setting up a frame on the master slide
and then binding the treeview to the frame when the slide is activated.

As an attempt to do all this, I downloaded the VBA Controls Assistant add-in
but the treeview cannot be applied to the master slide. So this has left me
a little stumped.

If anyone has any pointers on the use of a treeview in Powerpoint in this
way, I would be very grateful. ALternatively, if anyone knows any decent
sources of information or forums on this, I would be happy also.

Many thank in advance

James
 
 
 

Setting up and Using TreeView Control in PowerPoint

Post by Shyam Pill » Fri, 29 Sep 2006 23:56:48

Hi James,
You *can* insert a treeview control on the master slide and you can interact
with it in the normal way just as you would on the userform. Go ahead an
manually draw the control on the master slide and proceed. You will need to
hook up the slideshow event in PPT to populate the control but apart from
that you should have no issues.

Regards,
Shyam Pillai

Animation Carbon
www.animationcarbon.com

 
 
 

Setting up and Using TreeView Control in PowerPoint

Post by SmFtZXMgQm » Sat, 30 Sep 2006 00:13:02

hanks for the RAPID response. If I want to add the treeview by VBA, how do
I call the treeview? I have tried with
set myTreeview = ppslide.shapes.addOLEObject(Left:=65.125,
Top:=145.25,Width:=243.875,Height:=289.125,
ClassName:="MSComctlLib.TreeCtrl.2", Link:=msoFalse)

but I then have trouble applying the required properties to the nodes.
myTreeview is declared publicly as MSComctlLib.TreeView. is this were I am
going wrong? I keep getting type mismatch errors.

Thanks,

James
"Shyam Pillai" wrote:

 
 
 

Setting up and Using TreeView Control in PowerPoint

Post by Shyam Pill » Sat, 30 Sep 2006 00:54:07

hange it to:

Set myTreeview = ppslide.shapes.addOLEObject(Left:=65.125,
Top:=145.25,Width:=243.875,Height:=289.125,
ClassName:="MSComctlLib.TreeCtrl.2",
Link:=msoFalse).OLEFormat.Object
--
Regards,
Shyam Pillai

Toolbox
http://skp.mvps.org/toolbox

"James Batley" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...