Hello everyone,
I'm trying to achieve a couple things that are related:
Main issue:
I want to write code so that when this function is run, the currently selected picture will have an artistic effect applied. This is the code I've tried to write for it, but I cannot get it to work. Note, this is not intended to be used during presentation mode, but normal mode.
[VBA]Sub EdgeDefine()
Dim myShape As Shape
Dim myEffect As PictureEffect
If ActiveWindow.Selection.Type = ppSelectionShapes Then
Set myShape = ActiveWindow.Selection
With myShape.Fill.PictureEffects
If .Count > 0 Then
.Delete (1)
Else
.Insert (msoEffectGlowEdges)
End If
End With
End If
End Sub
[/VBA]
My second problem (related), is I want to tie this macro to a custom button that I can put on the ribbon. What's the easiest/most efficient way how to accomplish this?