如何使用OpenXml c#for PPT在Center中对齐段落?

问题描述

我正在尝试将我的段落在ppt的中心对齐,但无法正常工作!

这是我的代码

 public static void ChangeSlidePart(SlidePart slidePart1,PresentationPart presentationPart)
    {
        Slide slide1 = slidePart1.Slide;

        CommonSlideData commonSlideData1 = slide1.GetFirstChild<CommonSlideData>();

        ShapeTree shapeTree1 = commonSlideData1.GetFirstChild<ShapeTree>();

        Shape shape1 = shapeTree1.GetFirstChild<Shape>();

        TextBody textBody1 = shape1.GetFirstChild<TextBody>();

        D.Paragraph paragraph1 = textBody1.GetFirstChild<D.Paragraph>();


        D.Run run1 = paragraph1.GetFirstChild<D.Run>();


        run1.RunProperties= new D.RunProperties() {FontSize = 6600};

        run1.RunProperties.Append(new D.LatinFont() { Typeface = "Arial Black" });


        //run1.Append(runProperties1);
        D.Text text1 = run1.GetFirstChild<D.Text>();
        text1.Text = "Good day";
        
    }

我尝试将具有相应理由的属性添加到本段中,但未更新任何内容

感谢您的帮助!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)