wp_xxyyzz Guest
|
Posted: Thu Sep 23, 2004 9:22 pm Post subject: Replacing a shape in a Powerpoint animation sequence |
|
|
Hi,
I want to replace pictures on Powerpoint2002 slides with
memory-optimized copies of these shapes (copy to clipboard, paste back
in as JPG). The pasted picture, however, loses the animation effects
thate were assigned to the original shape.
I am trying to avoid this by calling the following procedure, however,
receive a runtime error "type conflict" at the line indicated:
procedure ReplaceShapeInSequence(oldshape,newshape,sequence:OLEVariant);
var
effect : OLEVariant;
i : integer;
begin
for i:=1 to sequence.Count do begin
effect := sequence.Item(i);
if AnsiCompareText(
VarToStr(effect.shape.Name),
VarToStr(oldshape.Name)
) =0
then begin
effect.shape := newshape; // "type conflict"
end;
end;
end;
It seems to be that it is not possible to replace the "effect.shape" by
another shape in a simple assignment.
Is there a working solution for this problem?
With kind regards,
Werner
|
|