N
Novice
Hey all, does anyone know of a way to look for "some text" in a cell in a
table, then move to the cell to the right of that cell and put "some other
text"?
I have the following - but it sometimes puts the "some other text" twice:
With ActiveDocument.Content.Find
.ClearFormatting
Do While .Execute(FindText:="some text", Forward:=True, _
Format:=True) = True
'Selection.Delete
Selection.SelectCell
Selection.MoveRight
'With .Parent
With .Parent
.StartOf Unit:=wdParagraph, Extend:=wdMove
.Move Unit:=wdCell, Count:=1
.InsertAfter "some other text"
.Move Unit:=wdCell, Count:=1
End With
Loop
End With
Also, ideally I would like to delete that "some text" first and then move to
the cell to the right and put "some other text". You can see where I have
deleted that portion of the code - because that just totally messed things up.
Thanks,
Novice
table, then move to the cell to the right of that cell and put "some other
text"?
I have the following - but it sometimes puts the "some other text" twice:
With ActiveDocument.Content.Find
.ClearFormatting
Do While .Execute(FindText:="some text", Forward:=True, _
Format:=True) = True
'Selection.Delete
Selection.SelectCell
Selection.MoveRight
'With .Parent
With .Parent
.StartOf Unit:=wdParagraph, Extend:=wdMove
.Move Unit:=wdCell, Count:=1
.InsertAfter "some other text"
.Move Unit:=wdCell, Count:=1
End With
Loop
End With
Also, ideally I would like to delete that "some text" first and then move to
the cell to the right and put "some other text". You can see where I have
deleted that portion of the code - because that just totally messed things up.
Thanks,
Novice