Jean-Guy
Thu Feb 19 10:20:15 CST 2004
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
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site:
http://www.word.mvps.org
<anonymous@discussions.microsoft.com> a écrit dans le message de news:
1238c01c3f6d8$6ad971b0$a101280a@phx.gbl...
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
>-----Original Message-----
>Hi Thom,
>
>Look up the <Unlink> method
>(
>if your Excel object is inline:
> Selection.Fields(1).Unlink
>)
>or
>the <BreakLink> method
>(
>if your Excel object is wrapped:
> ActiveDocument.Shapes(1).LinkFormat.BreakLink
>)
>..
>
>There are good examples in the VBE help.
>
>--
>Cheers!
>_______________________________________
>Jean-Guy Marcil - Word MVP
>jmarcilREMOVE@CAPSsympatico.caTHISTOO
>Word MVP site:
http://www.word.mvps.org
>
>
>"Thom" <thom.moon@baring-asset.com> a écrit dans le
message de news:
>11e8801c3f63b$56a98740$a301280a@phx.gbl...
>> I am trying to find away to automatically break linked
>> data from excel with out having to use the "edit" menu,
>> and after much searching have drawn a blank.
>>
>> If anyone has any ideas if it's possible, i'd be very
>> appreciative
>
>
>.
>