Hi there, I really hope someone can help with this one. I have a simple recorded macro (code below) which I'm trying to modify. It's for use in MS Word 2003 tables: With the cursor in front of a percentage number in a table cell, I run the macro. It puts the figure in italics and deletes the percentage sign, then tabs to the next cell along ready to do the same again.
What's the best way to get this to loop through the table cells through to the end of the row? Or maybe through the selected parts of the table? The macro would typically not be applied to an entire table, just a couple of rows.
I'm new to editing macros and so far all attempts at getting this to loop have failed. If anyone can suggest a different way - please let me know!
- ..Sub percentage()
-
'
-
' percentage Macro
-
'
-
Selection.Extend
-
Selection.Extend
-
Selection.Font.Italic = wdToggle
-
Selection.MoveRight Unit:=wdCharacter, Count:=1
-
Selection.Delete Unit:=wdCharacter, Count:=1
-
Selection.MoveRight Unit:=wdCell
-
Selection.MoveLeft Unit:=wdCharacter, Count:=1
-
End Sub
-
..
Thank you!