Hi again,
I managed to create a a macro (thanks cosmo) that paste "flags" (shapes of different colors) to clasify the slides of a presentation.
There are 3 types of flags, each one corresponds to the current status of the slide.
Now i want that when im going to change the status of the slide (paste a new flag) replace the old flag with the new one. Beacuse now I keep pasting shapes over the previous flag and on and on... I want the macro to see if in a specific location there is a flag, if positive , delete the flag so i can paste the new one, this this make sense??
Or maybe you come up with a better solution hehe
[VBA]Sub AZ_Banderita_Azul()
'if there´s no slide selected the shape will be pasted in the previous slide
On Error Resume Next
Err.Clear
'Debug.Print "The current slide is Slide " & ActiveWindow.View.Slide.SlideIndex
If Err <> 0 Then
ActiveWindow.ViewType = ppViewNotesPage
ActiveWindow.ViewType = ppViewNormal
'Debug.Print "The current slide is Slide " & ActiveWindow.View.Slide.SlideIndex
End If
'creates shape
slideLocation = ActiveWindow.View.Slide.SlideIndex
Set myDocument = ActivePresentation.Slides(slideLocation)
Dim shp As Shape
Set shp = myDocument.Shapes.AddShape(msoShapeRectangle, 570, 0, 150, 100)
With shp
.Line.Visible = msoFalse
.Fill.Transparency = 0.35
.Fill.Visible = msoTrue
.Fill.ForeColor.RGB = RGB(0, 176, 240)
.Fill.Solid
.TextFrame.TextRange.Text = "READY TO PROOF"
.TextFrame.TextRange.Font.Color.RGB = RGB(255, 255, 0)
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.TextRange.Font.Name = "Arial"
.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignRight
.TextFrame.MarginRight = 3
.TextFrame.MarginTop = 3
.TextFrame.TextRange.Font.Size = 12
.TextFrame2.VerticalAnchor = msoAnchorTop
End With
End Sub[/VBA]