RayKay
06-13-2023, 02:38 AM
Hi John
Back in 2018 you helped with this code, just wondering how I can make it also work on selected Grouped text boxes (it works well on shapes that aren't in a Group). Thank you :)
Sub BulletText10()
Dim L As Long
Dim oshp As shape
Set oshp = ActiveWindow.Selection.ShapeRange(1)
If oshp.HasTextFrame Then
If oshp.TextFrame2.HasText Then
With oshp.TextFrame2.textRange
For L = 1 To .Paragraphs.Count
Select Case .Paragraphs(L).ParagraphFormat.IndentLevel
Case Is = 1 ' note the FirstLine Indent is constant
.Paragraphs(L).ParagraphFormat.FirstLineIndent = cm2Points(-0.5)
.Paragraphs(L).ParagraphFormat.LeftIndent = cm2Points(0.5)
.Paragraphs(L).ParagraphFormat.Bullet.Font.Name = "WingDings"
.Paragraphs(L).ParagraphFormat.Bullet.Character = 167
.Paragraphs(L).ParagraphFormat.Bullet.Font.Fill.ForeColor.RGB = RGB(255, 0, 0)
Case Is = 2
.Paragraphs(L).ParagraphFormat.FirstLineIndent = cm2Points(-0.5)
.Paragraphs(L).ParagraphFormat.LeftIndent = cm2Points(1#)
.Paragraphs(L).ParagraphFormat.Bullet.Font.Name = "Arial"
.Paragraphs(L).ParagraphFormat.Bullet.Character = 8211
.Paragraphs(L).ParagraphFormat.Bullet.Font.Fill.ForeColor.RGB = RGB(255, 0, 0)
Case Is = 3
.Paragraphs(L).ParagraphFormat.FirstLineIndent = cm2Points(-0.5)
.Paragraphs(L).ParagraphFormat.LeftIndent = cm2Points(1.5)
.Paragraphs(L).ParagraphFormat.Bullet.Font.Name = "WingDings"
.Paragraphs(L).ParagraphFormat.Bullet.Character = 167
.Paragraphs(L).ParagraphFormat.Bullet.Font.Fill.ForeColor.RGB = RGB(255, 0, 0)
End Select
Next L
End With
End If
End If
End Sub
Back in 2018 you helped with this code, just wondering how I can make it also work on selected Grouped text boxes (it works well on shapes that aren't in a Group). Thank you :)
Sub BulletText10()
Dim L As Long
Dim oshp As shape
Set oshp = ActiveWindow.Selection.ShapeRange(1)
If oshp.HasTextFrame Then
If oshp.TextFrame2.HasText Then
With oshp.TextFrame2.textRange
For L = 1 To .Paragraphs.Count
Select Case .Paragraphs(L).ParagraphFormat.IndentLevel
Case Is = 1 ' note the FirstLine Indent is constant
.Paragraphs(L).ParagraphFormat.FirstLineIndent = cm2Points(-0.5)
.Paragraphs(L).ParagraphFormat.LeftIndent = cm2Points(0.5)
.Paragraphs(L).ParagraphFormat.Bullet.Font.Name = "WingDings"
.Paragraphs(L).ParagraphFormat.Bullet.Character = 167
.Paragraphs(L).ParagraphFormat.Bullet.Font.Fill.ForeColor.RGB = RGB(255, 0, 0)
Case Is = 2
.Paragraphs(L).ParagraphFormat.FirstLineIndent = cm2Points(-0.5)
.Paragraphs(L).ParagraphFormat.LeftIndent = cm2Points(1#)
.Paragraphs(L).ParagraphFormat.Bullet.Font.Name = "Arial"
.Paragraphs(L).ParagraphFormat.Bullet.Character = 8211
.Paragraphs(L).ParagraphFormat.Bullet.Font.Fill.ForeColor.RGB = RGB(255, 0, 0)
Case Is = 3
.Paragraphs(L).ParagraphFormat.FirstLineIndent = cm2Points(-0.5)
.Paragraphs(L).ParagraphFormat.LeftIndent = cm2Points(1.5)
.Paragraphs(L).ParagraphFormat.Bullet.Font.Name = "WingDings"
.Paragraphs(L).ParagraphFormat.Bullet.Character = 167
.Paragraphs(L).ParagraphFormat.Bullet.Font.Fill.ForeColor.RGB = RGB(255, 0, 0)
End Select
Next L
End With
End If
End If
End Sub