M
mouac01
I need help finding a word and then replacing that word with a
paragraph. I reach the 255 string limit with a Find/Replace. In the
document I have a placeholder word [txtString]. I search for the
[txtString] and replace it with a paragraph from a data entry form.
The only other way I can think of to do this is with a bookmark or
setting a range and then inserting the paragraph. But I'm not sure how
to do this either. Thanks... CM
With ActiveDocument.StoryRanges(wdMainTextStory).Find
.ClearFormatting
.Text = "[" & cntrl.Name & "]"
.Replacement.ClearFormatting
.Replacement.Text = cntrl.Text
.Forward = True
.Wrap = wdFindContinue
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.MatchCase = False
.Execute Replace:=wdReplaceOne
End With
paragraph. I reach the 255 string limit with a Find/Replace. In the
document I have a placeholder word [txtString]. I search for the
[txtString] and replace it with a paragraph from a data entry form.
The only other way I can think of to do this is with a bookmark or
setting a range and then inserting the paragraph. But I'm not sure how
to do this either. Thanks... CM
With ActiveDocument.StoryRanges(wdMainTextStory).Find
.ClearFormatting
.Text = "[" & cntrl.Name & "]"
.Replacement.ClearFormatting
.Replacement.Text = cntrl.Text
.Forward = True
.Wrap = wdFindContinue
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.MatchCase = False
.Execute Replace:=wdReplaceOne
End With