D
dpomt
I would like to use D&D to fill a placeholder with an image, the image should
not be embedded but linked.
Since there is not D&D event in VBA/VSTO, I thought about writing a VSTO
addin. The addin would have to accomplish the following three tasks:
1) subclass PPT child window (assign window handle of "paneClassDC"/"Slide"
to subclass) in order to handle WM_DROPFILES message (as proposed by Ji Zhou
[MSFT] similarly for handling Word D&D).
2) determine if drop target is a placeholder (using mouse position)
3) if drop target is a placeholder, set its content to the dropped image.
Is this a feasible approach?
Concerning 2):
Any ideas how could this be achieved?
Concerning 3):
How can I set programmatically (VBA/VSTO) a linked image as content of a
placeholder?
I am able to set text to a placeholder, e.g.
mySlide.Shapes.PlaceHolders(1).TextFrame.TextRange = "Some text", but I did
not find any possibility to set the placeholders content to an image.
Any suggestions are warmly welcome.
Best regards
dpomt
not be embedded but linked.
Since there is not D&D event in VBA/VSTO, I thought about writing a VSTO
addin. The addin would have to accomplish the following three tasks:
1) subclass PPT child window (assign window handle of "paneClassDC"/"Slide"
to subclass) in order to handle WM_DROPFILES message (as proposed by Ji Zhou
[MSFT] similarly for handling Word D&D).
2) determine if drop target is a placeholder (using mouse position)
3) if drop target is a placeholder, set its content to the dropped image.
Is this a feasible approach?
Concerning 2):
Any ideas how could this be achieved?
Concerning 3):
How can I set programmatically (VBA/VSTO) a linked image as content of a
placeholder?
I am able to set text to a placeholder, e.g.
mySlide.Shapes.PlaceHolders(1).TextFrame.TextRange = "Some text", but I did
not find any possibility to set the placeholders content to an image.
Any suggestions are warmly welcome.
Best regards
dpomt