Yes, it is a bit confusing, isn't it?
Document objects have a Range *method* which can (optionally) take a start
and end position to return a range which is a subset of the document range.
Other objects have a Range *property* which simply returns the complete
range belonging to the object.
I guess the underlying reason is to do with the fact that range starts and
ends are all measured relative to the document.
--
Enjoy,
Tony
> Hi,
>
[quoted text clipped - 20 lines]
> Kind regards
> Bo Rasmussen
Bo Rasmussen - 06 Feb 2006 13:48 GMT
Hi again,
Hmmm- do you know what I should do to obtain my goal then? I simply want to
iterate through the sections and retrieve the first 4 characters in each
section.
Kind regards
Bo Rasmussen
> Yes, it is a bit confusing, isn't it?
>
[quoted text clipped - 38 lines]
> > Kind regards
> > Bo Rasmussen
Tony Jollans - 06 Feb 2006 14:00 GMT
Why not use something like Left$(oSection.Range.Text,4)
--
Enjoy,
Tony
> Hi again,
>
[quoted text clipped - 51 lines]
> > > Kind regards
> > > Bo Rasmussen
Bo Rasmussen - 06 Feb 2006 14:10 GMT
Thnx :o)
> Why not use something like Left$(oSection.Range.Text,4)
>
[quoted text clipped - 61 lines]
> > > > Kind regards
> > > > Bo Rasmussen
Greg - 06 Feb 2006 16:28 GMT
Maybe:
Sub Test()
Dim oSection As Section
Dim oRange As Range
For Each oSection In ActiveDocument.Sections
Set oRange = oSection.Range
oRange.Collapse wdCollapseStart
oRange.MoveEnd wdCharacter, 4
MsgBox oRange
Next oSection
End Sub