F
fred
Doug Robbins has kindly helped with this code and it works great except I
have 2 colum tables as well.
I have SUBJECT line in letter with a 2 column table in some letters
sometimes and Select Range freezes on select.
Is there any way to search "OUR REF:" and make the range select from below
last row table IF TABLE EXISTS else the code executes as it does now still?
Any ideas on how to include the TABLE part please?
Dim Body As Range
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Dear"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Set Body = Selection.Range
Body.End = ActiveDocument.Range.End
'Body.Start = Body.Start + InStr(Body, "Dear")
Body.Start = Body.Start + Len(Body.Paragraphs(1).Range) ' - 1
Body.End = Body.Start + InStr(Body, "Yours") - 1
Body.Select
have 2 colum tables as well.
I have SUBJECT line in letter with a 2 column table in some letters
sometimes and Select Range freezes on select.
Is there any way to search "OUR REF:" and make the range select from below
last row table IF TABLE EXISTS else the code executes as it does now still?
Any ideas on how to include the TABLE part please?
Dim Body As Range
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Dear"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Set Body = Selection.Range
Body.End = ActiveDocument.Range.End
'Body.Start = Body.Start + InStr(Body, "Dear")
Body.Start = Body.Start + Len(Body.Paragraphs(1).Range) ' - 1
Body.End = Body.Start + InStr(Body, "Yours") - 1
Body.Select