最佳答案
我认为这很简单。检查此代码:
Sub AlignParagraphs()
Dim SHP As Shape
Set SHP = ActiveSheet.Shapes(1)
Dim txtRNG2 As TextRange2
Set txtRNG2 = SHP.TextFrame2.TextRange
With txtRNG2
.Paragraphs(1).ParagraphFormat.Alignment = msoAlignRight
.Paragraphs(2).ParagraphFormat.Alignment = msoAlignLeft
End With
End Sub
关于excel - 如何通过VBA Excel设置对齐Shape中的段落?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32195243/