首页/ 接口索引/ Text 文本对象

shape.Text.IsParagraphText

是否段落文本(区域内换行)。

签名

shape.Text.IsParagraphText

说明

是否段落文本(区域内换行)。

Python 示例(可直接运行)

依赖 pywin32。示例假定 app / doc / page / layer 已就绪。 见「连接与初始化」
Python
shape = app.ActiveSelectionRange(1)

if shape.Text.IsParagraphText:     # 段落文本 = 在框内自动换行
    print("段落文本,行数:", shape.Text.Story.Lines.Count)
else:
    print("美术字")

关于本类:Text 文本对象

文字接口分两层:Shape.Text 是入口,真正读写字体字号要下到 Story.Characters.All。

同类其他接口