Skip to content

Instantly share code, notes, and snippets.

@mupacif
Last active September 13, 2017 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mupacif/b4a56e82285dcf1dd65e3247994d976a to your computer and use it in GitHub Desktop.
Save mupacif/b4a56e82285dcf1dd65e3247994d976a to your computer and use it in GitHub Desktop.
word macro
Sub transformMyText()
Dim cellText As String
For Each oTbl In ActiveDocument.Tables
'MsgBox oTbl.Columns.count
For Each oRw In oTbl.Rows
For Each oCll In oRw.Cells
cellText = oCll.Range.Text
If ((Len(cellText) > 3) And (oCll.Range.Font.Bold = -1)) Then
oCll.Range.Text = cellText & "="
'MsgBox oCll.Range.Font.Bold
ElseIf (Len(cellText) > 3) Then
oCll.Range.Text = cellText & "="
End If
Next oCll
Next oRw
Next oTbl
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment