MATLAB 帮助中心
本页采用了机器翻译。点击此处可查看最新英文版本。
类: mlreportgen.ppt.TextBox 命名空间: mlreportgen.ppt
替换文本框段落
paraObj = replace(textBox,content)
replace(textBox,contents)
paraObj = replace(textBox,content) 替换文本框中的段落。
paraObj
textBox
content
replace(textBox,contents) 替换文本框占位符中的多个段落。
contents
示例
全部展开
创建演示文稿。
import mlreportgen.ppt.* ppt = Presentation('myTextBoxReplacePresentation.pptx"); slide = add(ppt,"Blank");
创建 mlreportgen.ppt.Paragraph 对象。
mlreportgen.ppt.Paragraph
p = Paragraph("Hello World");
在空白幻灯片 (slide) 中添加一个文本框。
slide
tb = TextBox(); tb.X = "1in"; tb.Y = "1in"; tb.Width = "4in"; tb.Height = "2in"; add(slide,tb);
将段落添加到文本框。
add(tb,p);
替换文本框的内容。
replace(tb,"This is the real content");
关闭并查看演示文稿。
close(ppt); rptview(ppt);
mlreportgen.ppt.TextBox
文本框中替换文本,指定为 mlreportgen.ppt.TextBox 对象。
用作替换的文本,指定为字符向量、字符串标量或 mlreportgen.ppt.Paragraph 对象。
用作替换的多个段落,指定为字符串数组或元胞数组,可以包含字符向量、mlreportgen.ppt.Paragraph 对象,或字符向量、字符串标量、字符串数组或 mlreportgen.ppt.Paragraph 对象的组合。对于元胞数组,内层元胞数组或字符串数组的内容相对于外层元胞数组的内容缩进。
段落,作为 mlreportgen.ppt.Paragraph 对象返回。
在 R2015b 中推出
mlreportgen.ppt.TextBox | add | mlreportgen.ppt.Paragraph
add
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处