0
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>
    }

これらの種類の情報(firstpositionx、firstpositiony、lastpositionx、lastpositiony、firstheight、firstwidth、lastheight、lastwidth、firstalpha、lastalpha)を取得して、Powerpointシェイプからxmlドキュメントを挿入するにはどうすればよいですか?

4

1 に答える 1

0

http://msdn.microsoft.com/en-us/library/office/aa155781(v=office.10).aspxのおかげで問題を解決しました

于 2013-07-08T14:39:53.633 に答える