Create a shape with a predefined format?
Hi there, Im trying to create a macro that paste "flags" (shapes of different colors) to clasify the slides of a presentation.
I´m totally new to VBA. I managed to create a rectangular shape in the TOP RIGHT corner of the current slide, but it create a blue shape with blue border, and i want this shape to be red, 35% transparency and no border.
Is there any way to pre-define the format of the shape before creating it? or should I change the shape´s format once it´s created?
Thanks!
[VBA]Sub AZ_Banderitas()
'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
myDocument.Shapes.AddShape Type:=msoShapeRectangle, Left:=570, Top:=0, width:=150, Height:=100
End Sub[/VBA]