TextFrame

TextFrame class

表示一个 TextFrame。

public sealed class TextFrame : ITextFrame

属性

名称描述
HyperlinkQueries { get; }提供对包含的超链接的快速访问。只读 IHyperlinkQueries
Paragraphs { get; }返回框架中所有段落的列表。只读 IParagraphCollection
ParentCell { get; }返回父单元格,如果父对象不实现 ICell 接口则返回 null。只读 ICell
ParentShape { get; }返回父形状,如果父对象不实现 IShape 接口则返回 null。只读 IShape
Presentation { get; }返回 TextFrame 的父演示文稿。只读 IPresentation
Slide { get; }返回 TextFrame 的父幻灯片。只读 IBaseSlide
Text { get; set; }获取或设置 TextFrame 的纯文本。读写字符串。
TextFrameFormat { get; }返回该 TextFrame 对象的格式化对象。只读 ITextFrameFormat

方法

名称描述
HighlightRegex(Regex, Color, IFindResultCallback)用指定颜色高亮显示正则表达式的所有匹配项。
HighlightText(string, Color)用指定颜色高亮显示示例文本的所有匹配项。
HighlightText(string, Color, ITextSearchOptions, IFindResultCallback)用指定颜色高亮显示示例文本的所有匹配项。
JoinPortionsWithSameFormatting()将所有段落中具有相同格式的文本合并。
ReplaceRegex(Regex, string, IFindResultCallback)将正则表达式的所有匹配项替换为指定字符串。
ReplaceText(string, string, ITextSearchOptions, IFindResultCallback)将指定文本的所有出现替换为另一个指定文本。
SplitTextByColumns()ITextFrame 的文本内容拆分为字符串数组,其中每个元素对应于框架内的单个文本列。

另见