项目符号的编号设置
Number setting for bullets
我目前正在构建一个 PowerPoint 插件,它创建一个包含文本格式信息的 .xml 文件。
它的一项任务是保存字符范围的项目符号设置,因为我正在手动拆分文本。我正在努力重新组装子弹:
如何设置要点数(每个代码)?当我尝试做
<TextRange>.ParagraphFormat.Bullet.Number = X
我收到错误 "ReadOnly attribute"。
还有比手动拆分文本更好的方法吗?我通过检查 Font.size、样式、颜色、名称等方面的差异来划分它。<TextRange>.Paragraphs(i)
returns 很多空段落..
谢谢!
*编辑
一个例子是
- 就是这样
- 一个
- 测试
我将有 3 个 TextRanges(Thats、A、test)并想创建与上面相同的项目符号。
类似这样,以当前选中的形状为例:
Dim oSh As Shape
Dim x As Long
Set oSh = ActiveWindow.Selection.ShapeRange(1)
With oSh.TextFrame.TextRange
For x = 1 To .Paragraphs.Count
' is it an empty paragraph?
If Len(.Paragraphs(x).Text) > 0 Then
.Paragraphs(x).ParagraphFormat.Bullet.Style = ppBulletArabicPeriod
End If
Next
End With
我目前正在构建一个 PowerPoint 插件,它创建一个包含文本格式信息的 .xml 文件。
它的一项任务是保存字符范围的项目符号设置,因为我正在手动拆分文本。我正在努力重新组装子弹:
如何设置要点数(每个代码)?当我尝试做
<TextRange>.ParagraphFormat.Bullet.Number = X
我收到错误 "ReadOnly attribute"。
还有比手动拆分文本更好的方法吗?我通过检查 Font.size、样式、颜色、名称等方面的差异来划分它。<TextRange>.Paragraphs(i)
returns 很多空段落..
谢谢!
*编辑 一个例子是
- 就是这样
- 一个
- 测试
我将有 3 个 TextRanges(Thats、A、test)并想创建与上面相同的项目符号。
类似这样,以当前选中的形状为例:
Dim oSh As Shape
Dim x As Long
Set oSh = ActiveWindow.Selection.ShapeRange(1)
With oSh.TextFrame.TextRange
For x = 1 To .Paragraphs.Count
' is it an empty paragraph?
If Len(.Paragraphs(x).Text) > 0 Then
.Paragraphs(x).ParagraphFormat.Bullet.Style = ppBulletArabicPeriod
End If
Next
End With