Home |
Search |
Today's Posts |
#6
|
|||
|
|||
Apply a macro to a specified Cell
Abel,
Did you try it? What do you think? I don't think so, because before the .Execute statement you have only changed your mind twice regarding what text you want to find and what you want that text replaced with. This would work: Sub Test1() Dim myRng As Range Set myRng = ActiveDocument.Tables(1).Cell(2, 1).Range With myRng.Find .Text = "uncle" .Replacement.Text = "favorit uncle" .Execute Replace:=wdReplaceAll .Text = "nefew" .Replacement.Text = "favorit nefew" .Execute Replace:=wdReplaceAll .Text = "sista" .Replacement.Text = "favorit sista" .Execute Replace:=wdReplaceAll End With End Sub |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to wrap text from cell to cell in a table. | Tables | |||
Macro Button Won't Stay on Toolbar | Microsoft Word Help | |||
Possible bug when recording a Word Macro | Microsoft Word Help | |||
2000 to 2002 macro and "Could not open macro storage" | Mailmerge | |||
Macro to set selected cell padding to table default | Tables |