Hallo Champs

I am getting mad on the following:

Is it possible to check a value between two or more headlines (changing headline, about 100 in the document) and if the desired content does not exist = delete all between

Sample:

Should look like:
=================
Headline
anyword anyword
anyword anyword anyword anyword
URL

Headline
...

WHEN:
there is no URL or description between headline and url, the complete paragraph should be deleted

Is that possible?

Notice:
Must use wildcarts

Styles in use are
Headline=H1
Text=Normal
URL=Hyperlink


Thx for any hint

*****************************************
* This message was posted via http://www.officekb.com
*
* Report spam or abuse by clicking the following URL:
* http://www.officekb.com/Uwe/Abuse.aspx?aid=87333c7b0f4a4656bf84dd541bffccd5
*****************************************

Re: ?check if chapter contains hyperlink, if not, delete by Helmut

Helmut
Mon Oct 25 09:06:26 CDT 2004

Hallo Frank,
maybe this could be of help to you,
though quite a number of questions
have still to be answered.
Sub test891()
ResetSearch
With Selection
.ExtendMode = False
.HomeKey unit:=wdStory
End With
With Selection.Find
.Style = "H1"
While .Execute
Selection.Bookmarks("\headinglevel").Select
MsgBox Selection.Hyperlinks.Count
' do what you like
Selection.Collapse direction:=wdCollapseEnd
Wend
End With
ResetSearch
End Sub
' ---
Public Sub ResetSearch()
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
End Sub
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000