Prev: Normal Style font
Next: Can't get the document to close
From: mjlaali on 15 Apr 2010 02:45 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 15 Apr 2010 03:23 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.
|
Pages: 1 Prev: Normal Style font Next: Can't get the document to close |