![](/img/trans.png)
[英]Calculate the size (Extents) of a text (TextBody) in OpenXML (PresentationML) PowerPoint (PPTX)
[英]PPTX OpenXML - Which is the newline indicator in bulleted text?
您能否幫助我確定PPTX OpenXML中項目符號文本中的換行指示符是什么? 基於此,我想在程序中添加換行符
-謝謝
使用休息班
因此,對於以下帶有項目符號列表和換行符的幻燈片:
請參閱從第三個項目符號到第四個項目顯示的以下代碼片段:
using DocumentFormat.OpenXml.Presentation;
using DocumentFormat.OpenXml;
using A = DocumentFormat.OpenXml.Drawing;
...
A.Run run3 = new A.Run();
A.RunProperties runProperties3 = new A.RunProperties(){ Language = "en-US", Dirty = false, SpellingError = true, SmartTagClean = false };
A.Text text3 = new A.Text();
text3.Text = "Th";
run3.Append(runProperties3);
run3.Append(text3);
A.Run run4 = new A.Run();
A.RunProperties runProperties4 = new A.RunProperties(){ Language = "en-US", Dirty = false, SmartTagClean = false };
A.Text text4 = new A.Text();
text4.Text = "";
run4.Append(runProperties4);
run4.Append(text4);
A.Break break1 = new A.Break();
A.RunProperties runProperties5 = new A.RunProperties(){ Language = "en-US", Dirty = false, SmartTagClean = false };
break1.Append(runProperties5);
A.Run run5 = new A.Run();
A.RunProperties runProperties6 = new A.RunProperties(){ Language = "en-US", Dirty = false, SpellingError = true, SmartTagClean = false };
A.Text text5 = new A.Text();
text5.Text = "ird";
run5.Append(runProperties6);
run5.Append(text5);
A.EndParagraphRunProperties endParagraphRunProperties1 = new A.EndParagraphRunProperties(){ Language = "en-US", Dirty = false, SmartTagClean = false };
paragraph3.Append(paragraphProperties3);
paragraph3.Append(run3);
paragraph3.Append(run4);
paragraph3.Append(break1);
paragraph3.Append(run5);
paragraph3.Append(endParagraphRunProperties1);
這段代碼是使用Open XML Productivity Tool生成的。 我強烈建議您使用它對在Excel,Word和PowerPoint中編寫代碼所需的事情進行反向工程。
希望這可以幫助...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.