如何获取powerpoint形状的动画属性? foreach(当前幻灯片中的PowerPoint.AnimationSettings动画) { getAnimation(参考XmlTextWriter xmlcreate、PowerPoint.Shape、int i) } 私有void getAnimation(参考XmlTextWriter xmlcreate、PowerPoint.Shape、int i) { writeStarteElement(“动画”,“动画”)// WriteAttributeString(“id”,“animasyon”+shape.id); WriteAttributeString(“type”,“animasyon”); WriteAttributeString(“userfriendlyindex”,i.ToString()); xmlcreate.WriteElementString(“duration”,“1”);//1 xmlcreate.WriteElementString(“开始”,“0”);//0 xmlcreate.WriteElementString(“放松”,“后退”);//后退 xmlcreate.WriteElementString(“媒体”,shape.Id.ToString());//7 xmlcreate.WriteElementString(“firstpositionx”,shape.TextFrame2.MarginLeft.ToString());//206 xmlcreate.WriteElementString(“firstpositiony”,shape.TextFrame2.MarginBottom.ToString());//64 WriteElementString(“lastpositionx”,“206”);//206 WriteElementString(“lastpositiony”,“64”);//64 xmlcreate.WriteElementString(“firstwidth”,shape.Width.ToString());//286 xmlcreate.WriteElementString(“firstheight”,shape.Height.ToString());//115 xmlcreate.WriteElementString(“firstalpha”,“0”);//0 WriteElementString(“lastwidth”,“286”);//286 xmlcreate.WriteElementString(“lastheight”,“115”);//115 xmlcreate.WriteElementString(“lastalpha”,“1”);//1 xmlcreate.WriteEndElement()// }

如何获取powerpoint形状的动画属性? foreach(当前幻灯片中的PowerPoint.AnimationSettings动画) { getAnimation(参考XmlTextWriter xmlcreate、PowerPoint.Shape、int i) } 私有void getAnimation(参考XmlTextWriter xmlcreate、PowerPoint.Shape、int i) { writeStarteElement(“动画”,“动画”)// WriteAttributeString(“id”,“animasyon”+shape.id); WriteAttributeString(“type”,“animasyon”); WriteAttributeString(“userfriendlyindex”,i.ToString()); xmlcreate.WriteElementString(“duration”,“1”);//1 xmlcreate.WriteElementString(“开始”,“0”);//0 xmlcreate.WriteElementString(“放松”,“后退”);//后退 xmlcreate.WriteElementString(“媒体”,shape.Id.ToString());//7 xmlcreate.WriteElementString(“firstpositionx”,shape.TextFrame2.MarginLeft.ToString());//206 xmlcreate.WriteElementString(“firstpositiony”,shape.TextFrame2.MarginBottom.ToString());//64 WriteElementString(“lastpositionx”,“206”);//206 WriteElementString(“lastpositiony”,“64”);//64 xmlcreate.WriteElementString(“firstwidth”,shape.Width.ToString());//286 xmlcreate.WriteElementString(“firstheight”,shape.Height.ToString());//115 xmlcreate.WriteElementString(“firstalpha”,“0”);//0 WriteElementString(“lastwidth”,“286”);//286 xmlcreate.WriteElementString(“lastheight”,“115”);//115 xmlcreate.WriteElementString(“lastalpha”,“1”);//1 xmlcreate.WriteEndElement()// },animation,properties,shape,Animation,Properties,Shape,如何获取此类信息(firstpositionx、firstpositiony、lastpositionx、lastpositiony、firstheight、firstwidth、lastheight、lastwidth、firstalpha和lastalpha)以从Powerpoint形状插入xml文档 多亏了有人帮我解决了问题吗? foreach (PowerPoint.AnimationSettings animation in currentslide.Shapes) { ge

如何获取此类信息(firstpositionx、firstpositiony、lastpositionx、lastpositiony、firstheight、firstwidth、lastheight、lastwidth、firstalpha和lastalpha)以从Powerpoint形状插入xml文档


多亏了

有人帮我解决了问题吗?
foreach (PowerPoint.AnimationSettings animation in currentslide.Shapes)
{
     getAnimation(ref XmlTextWriter xmlcreate, PowerPoint.Shape shape, int i)
}

private void getAnimation(ref XmlTextWriter xmlcreate, PowerPoint.Shape shape, int i)
    {
        xmlcreate.WriteStartElement("animation",""); //<animation id="Animasyon8" type="Animasyon" userfriendlyindex="2">
        xmlcreate.WriteAttributeString("id", "animasyon" + shape.Id);
        xmlcreate.WriteAttributeString("type", "animasyon");
        xmlcreate.WriteAttributeString("userfriendlyindex", i.ToString());
        xmlcreate.WriteElementString("duration", "1");         //<duration>1</duration>
        xmlcreate.WriteElementString("start", "0");//<start>0</start>
        xmlcreate.WriteElementString("easing", "back");//<easing>back</easing>
        xmlcreate.WriteElementString("media", shape.Id.ToString());//<media>7</media>
        xmlcreate.WriteElementString("firstpositionx", shape.TextFrame2.MarginLeft.ToString());//<firstpositionx>206</firstpositionx>
        xmlcreate.WriteElementString("firstpositiony", shape.TextFrame2.MarginBottom.ToString());//<firstpositiony>64</firstpositiony>
        xmlcreate.WriteElementString("lastpositionx", "206");//<lastpositionx>206</lastpositionx>
        xmlcreate.WriteElementString("lastpositiony", "64");//<lastpositiony>64</lastpositiony>
        xmlcreate.WriteElementString("firstwidth",shape.Width.ToString());//<firstwidth>286</firstwidth>
        xmlcreate.WriteElementString("firstheight",shape.Height.ToString());//<firstheight>115</firstheight>
        xmlcreate.WriteElementString("firstalpha", "0");//<firstalpha>0</firstalpha>
        xmlcreate.WriteElementString("lastwidth","286");//<lastwidth>286</lastwidth>
        xmlcreate.WriteElementString("lastheight", "115");//<lastheight>115</lastheight>
        xmlcreate.WriteElementString("lastalpha", "1");//<lastalpha>1</lastalpha>
        xmlcreate.WriteEndElement();//</animation>
    }