From: mjlaali on
Hi,

I have the startPoint and the endPoint of a Range located in a header, but I
don't have the Range object itself. How can I obtain the Range object itself.
When I use the startPoint and the endPoint with
document.Range(startPoint, endPoint);
it gives me a Range located in the text of document and not the header.
From: macropod on
Hi mjlaali,

You need to decide which Section and Header you want to work with. For example:
Dim Rng As Range
Set Rng = ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range
Rng.Start = StartPoint
Rng.End = EndPoint

--
Cheers
macropod
[Microsoft MVP - Word]


"mjlaali" <mjlaali(a)discussions.microsoft.com> wrote in message news:940D4675-924B-4461-8F38-212B672F1A70(a)microsoft.com...
> Hi,
>
> I have the startPoint and the endPoint of a Range located in a header, but I
> don't have the Range object itself. How can I obtain the Range object itself.
> When I use the startPoint and the endPoint with
> document.Range(startPoint, endPoint);
> it gives me a Range located in the text of document and not the header.