Hi Thom,
You have to cycle through all the StoryRanges.
Something like:
'_______________________________________
Sub test()
Dim myStoryRge As Range
Dim myCount As Long
For Each myStoryRge In ActiveDocument.StoryRanges
myCount = myCount + 1
While Not (myStoryRge.NextStoryRange Is Nothing)
Set myStoryRge = myStoryRge.NextStoryRange
myCount = myCount + 1
Wend
Next myStoryRge
MsgBox "There are " & myCount & " Story Ranges in this document."
End Sub
'_______________________________________
See the VBE Help, there are some more complete examples.
Look up also StoryType.
--
Cheers!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org
<
[email protected]> a écrit dans le message de
[email protected]...
This is absolutely brilliant, and will save an enormous
amount of time.
Just one question.
I can break all the links in the document and the frames,
but can't seem to be able to break the links in the Header
and any text boxes. Text boxes aren't such a problem as I
can, if necessary change them to frames, but the Headers
would be useful.
Any ideas?
Many thanks
Thom