A
avfc4me
So here I am again.
This is part of masterlist:
ActivePresentation.Slides(1).Tags.Add Name:="IncludeIn", Value:="ABCDEFGHIJ"
ActivePresentation.Slides(2).Tags.Add Name:="IncludeIn", Value:="B"
ActivePresentation.Slides(3).Tags.Add Name:="IncludeIn", Value:="C"
ActivePresentation.Slides(4).Tags.Add Name:="IncludeIn", Value:="E"
ActivePresentation.Slides(5).Tags.Add Name:="IncludeIn", Value:="H"
ActivePresentation.Slides(6).Tags.Add Name:="IncludeIn", Value:="B"
ActivePresentation.Slides(7).Tags.Add Name:="IncludeIn", Value:="E"
ActivePresentation.Slides(8).Tags.Add Name:="IncludeIn", Value:="H"
ActivePresentation.Slides(9).Tags.Add Name:="IncludeIn", Value:="I"
ActivePresentation.Slides(10).Tags.Add Name:="IncludeIn", Value:="J"
ActivePresentation.Slides(11).Tags.Add Name:="IncludeIn", Value:="C"
ActivePresentation.Slides(12).Tags.Add Name:="IncludeIn", Value:="ABCDEFGHIJ"
ActivePresentation.Slides(13).Tags.Add Name:="IncludeIn", Value:="ABCJ"
Set oMasterPres = Presentations.Open("C:\Project\employee_edu.ppt")
With Application.ActivePresentation
.SaveAs "temp.ppt"
End With
' Open the MasterPresentation
masterlist
Dim oNewPres As Presentation
Dim oNewSld As Slide
Dim oMasterSld As Slide
'Dim sSlideType As String
' Create a new presentation
'Set oNewPres = Presentations.Add
For Each oMasterSld In oMasterPres.Slides
If InStr(oMasterSld.Tags("IncludeIn"), "A") > 0 Then
Else
oMasterSld.Delete
End If
Next
' Master Slide
' close the master presentation
oMasterPres.Close
Here's the odd thing I don't understand:
It's deleting all of the correct ones except about 6 slides, that are coded
the same as the others, so I don't get it:
It deletes 2 through 11, but it also deletes 12 and 13, which have "A" in
them, but it doesn't delete "1", which has the same tag as 12 and 13 -- it
should KEEP 12 and 13, but doesn't.
Any ideas?
This is part of masterlist:
ActivePresentation.Slides(1).Tags.Add Name:="IncludeIn", Value:="ABCDEFGHIJ"
ActivePresentation.Slides(2).Tags.Add Name:="IncludeIn", Value:="B"
ActivePresentation.Slides(3).Tags.Add Name:="IncludeIn", Value:="C"
ActivePresentation.Slides(4).Tags.Add Name:="IncludeIn", Value:="E"
ActivePresentation.Slides(5).Tags.Add Name:="IncludeIn", Value:="H"
ActivePresentation.Slides(6).Tags.Add Name:="IncludeIn", Value:="B"
ActivePresentation.Slides(7).Tags.Add Name:="IncludeIn", Value:="E"
ActivePresentation.Slides(8).Tags.Add Name:="IncludeIn", Value:="H"
ActivePresentation.Slides(9).Tags.Add Name:="IncludeIn", Value:="I"
ActivePresentation.Slides(10).Tags.Add Name:="IncludeIn", Value:="J"
ActivePresentation.Slides(11).Tags.Add Name:="IncludeIn", Value:="C"
ActivePresentation.Slides(12).Tags.Add Name:="IncludeIn", Value:="ABCDEFGHIJ"
ActivePresentation.Slides(13).Tags.Add Name:="IncludeIn", Value:="ABCJ"
Set oMasterPres = Presentations.Open("C:\Project\employee_edu.ppt")
With Application.ActivePresentation
.SaveAs "temp.ppt"
End With
' Open the MasterPresentation
masterlist
Dim oNewPres As Presentation
Dim oNewSld As Slide
Dim oMasterSld As Slide
'Dim sSlideType As String
' Create a new presentation
'Set oNewPres = Presentations.Add
For Each oMasterSld In oMasterPres.Slides
If InStr(oMasterSld.Tags("IncludeIn"), "A") > 0 Then
Else
oMasterSld.Delete
End If
Next
' Master Slide
' close the master presentation
oMasterPres.Close
Here's the odd thing I don't understand:
It's deleting all of the correct ones except about 6 slides, that are coded
the same as the others, so I don't get it:
It deletes 2 through 11, but it also deletes 12 and 13, which have "A" in
them, but it doesn't delete "1", which has the same tag as 12 and 13 -- it
should KEEP 12 and 13, but doesn't.
Any ideas?