VBA-Ho how to change order of designs in the collection

  • Thread starter Thread starter Edward
  • Start date Start date
E

Edward

Hi everybody,
PP 2007
I have two templates in my PP. I used the following code to change the thier
order in the collection
ActivePresentation.Designs(2).MoveTo 1
but this code doesn't work.
Any suggestions how I can change this order. I In other words when you click
on layout dropdown it shows the first templates with its associated layout
and then shows next template with its layout and ... I want to switch those
twmplates position( first goes to second postion and second goes to the first
postion)
 
The code seems to work to move the master but AFAIK the layouts dropdown
always shows the last USED master first.
 
Thanks. If you wonder why I need to move the design template positions. I
first insert a design that is used only for the coverpage ( first slide) and
2-3 following slides, then for all other sidles( starting at slide 4) I
need a second design. I apply the new template (ApplyTemplate () ) to slide
4, and I expect after inserting new slides after slide 4 they automatically
use the second template ( the newly used one), but they use the first
template . Of course I can slide.ApplyTemplate() for each newly added
slide, but this solution adds a new design to the design collection (
although I use the same path and .potx for design , it just adds a prefix
1,2,… to the name and adds to the collection) . This is obviously isn’t a
good solution, because I don’t want to end up with hundreds of identical
templates, so I thought if I change the order of design templates It will
automatically use the correct template for newly added slides. Unfortunately
the problem with VBA is, a lot of times methods don’t work the way they are
suppose to work and we need to come up with some tricks to make it work. I
have two more options either just use one template , and because I need two
different title slides I can use the title slide layout , and 07 section
header layout , or I can first apply the second template and at the last
step apply the first template to the first slide !! :) ïŠ
 
Back
Top