word 图片居中

Sub PicCenter()
    Dim myS As InlineShape
    Application.ScreenUpdating = False
    For Each myS in ActiveDocument.InlineShapes
        If Len(myS.Range.Paragraphs(1).Range.Text) = 2 Then
            myS.Range.Paragraphs.Alignment = wdAlignParagraphCenter
        End If
    Next
    Application.ScreenUpdating = True
End Sub

 

posted on 2022-01-19 14:42  编程007  阅读(68)  评论(0编辑  收藏  举报