A
andreas
Dear Experts:
Below macro changes all text within text boxes to "arial ,bold, Size
8". So far, so good. This macro is working
a. But I also got text boxes within canvasses. How do I have to
change the code so that text boxes within canvases also get their font
changed to "Arial Bold 8"?
b. I also got grouped text boxes in my document. How do I have to
change the code so that grouped text boxes also get their font changed
to "Arial Bold 8"?
Help is much appreciated. Thank you very much in advance. Regards,
Andreas
Sub ApplyFontToTextBoxes()
Dim shp As Word.Shape
For Each shp In ActiveDocument.Shapes
With shp.TextFrame
If .HasText Then
.TextRange.Font.Name = "Arial"
.TextRange.Font.Size = 8
.TextRange.Bold = True
End If
End With
Next shp
End Sub
Below macro changes all text within text boxes to "arial ,bold, Size
8". So far, so good. This macro is working
a. But I also got text boxes within canvasses. How do I have to
change the code so that text boxes within canvases also get their font
changed to "Arial Bold 8"?
b. I also got grouped text boxes in my document. How do I have to
change the code so that grouped text boxes also get their font changed
to "Arial Bold 8"?
Help is much appreciated. Thank you very much in advance. Regards,
Andreas
Sub ApplyFontToTextBoxes()
Dim shp As Word.Shape
For Each shp In ActiveDocument.Shapes
With shp.TextFrame
If .HasText Then
.TextRange.Font.Name = "Arial"
.TextRange.Font.Size = 8
.TextRange.Bold = True
End If
End With
Next shp
End Sub