BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Replacing a shape in a Powerpoint animation sequence

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
wp_xxyyzz
Guest





PostPosted: Thu Sep 23, 2004 9:22 pm    Post subject: Replacing a shape in a Powerpoint animation sequence Reply with quote



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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.