Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub addTextForBooks()
- '
- ' addTextForBooks 巨集
- '
- '
- Dim shp As Shape
- For Each shp In ActiveDocument.Shapes
- Dim countStr As Integer
- Debug.Print shp.ZOrderPosition
- shp.Select
- If shp.TextFrame.HasText = -1 Then
- If shp.TextFrame.TextRange.Words.Count > 1 Then
- shp.TextFrame.AutoSize = -1
- shp.TextFrame.TextRange.InsertAfter Chr(13) & "上字"
- countStr = shp.TextFrame.TextRange.Characters.Count
- shp.TextFrame.TextRange.Characters.Item(countStr - 2).HighlightColorIndex = wdBrightGreen
- shp.TextFrame.TextRange.Characters.Item(countStr - 1).HighlightColorIndex = wdBrightGreen
- End If
- End If
- Next
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement