Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / September 2006

Tip: Looking for answers? Try searching our database.

Setting up and Using TreeView Control in PowerPoint

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James Batley - 28 Sep 2006 15:37 GMT
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
Shyam Pillai - 28 Sep 2006 15:56 GMT
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

> Hello all.
>
[quoted text clipped - 47 lines]
>
> James
James Batley - 28 Sep 2006 16:13 GMT
Thanks 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

> Hi James,
> You *can* insert a treeview control on the master slide and you can interact
[quoted text clipped - 60 lines]
> >
> > James
Shyam Pillai - 28 Sep 2006 16:54 GMT
Change 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
Signature

Regards,
Shyam Pillai

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

> Thanks for the RAPID response.  If I want to add the treeview by VBA, how
> do
[quoted text clipped - 90 lines]
>> >
>> > James
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.