Something that may help (maybe??)
- I tested this method in a very simple way
- but SendKeys can be unreliable if there are other things going on in your code
- VBA races ahead of itself when waiting for tasks to finish
- use delaying tactics within your code to ensure that everything works in the correct sequence
etc
MANUALLY
This is the manual equivalent of what you want to replicate by VBA (test it - so that you see it working)
(A) Manually create an image and apply one of the the picture format styles (image1)
(B) Manually insert an image (image2)
(C) Next click on image1 and
{CTRL}{SHIFT} c
(D) Next click on image2 and
{CTRL}{SHIFT} v
SEMI-AUTOMATED
I tested the use of SendKeys to replicate (C) & (D) and it worked in a very simple uncomplicated test, where I ...
... manually selected a model image, ran macro
ControlShiftC, manually selected new image , ran macro
ControlShiftV
Code:
Sub ControlShiftC()
SendKeys "^+c"
End Sub
Sub ControlShiftV()
SendKeys "^+v"
End Sub
I did not manage to automate the 4 steps together, and am now out of time
FULLY AUTOMATE
If you can fully automate, then this may do what you want
- Insert
28 images in a sheet and picture format each one with a different style (Model1... Model28)
- use VBA to automate (A) (B) (C) (D)
Good luck
Please report back on your progress and post solution if successful