Close active image in macro
Hello
Can someone please tell me how I can end a macro by closing the active image? I tried to use the macro recorder but was unsuccessful.
Any help greatly appreciated.
Thanks
Johnny
Can someone please tell me how I can end a macro by closing the active image? I tried to use the macro recorder but was unsuccessful.
Any help greatly appreciated.
Thanks
Johnny
0
Best Answer
-
Hi Johnny,
Activating the recording and closing the image should produce a proper macro.
Here is how it should be recorded:
Public Function CloseActiveImage() As SimpleScript CloseActiveImage = New SimpleScript Dim window1 With Application.WindowCommands.Active(CloseActiveImage) .Run(window1) End With With Application.WindowCommands.Close(CloseActiveImage) .Run(window1) End With End Function
Regards,
Yuri0