A
andreas
Dear Experts:
For some specific reason I need to copy a page field ( {Page
\*Arabic} ) located in one of my headers into the clipboard using
VBA.
How can I set a range in the header to include just the page field
( {Page \*Arabic} )
The header has the following make-up:
{StyleRef Heading 1\n} {StyleRef Heading 1} Tab Tab {Page
\*Arabic}
I guess the code should start like this but then I am not able to set
the range to include just the page field and copy it into the
clipboard.
Dim rng As Range
Dim sect As Section
Set sect = ActiveDocument.Sections(1)
Set rng = sect.Headers(wdHeaderFooterFirstPage).Range
rng.MoveUntil ???
rng.Copy ????
Help is much appreciated. Thank you very much in advance.Regards,
Andreas
For some specific reason I need to copy a page field ( {Page
\*Arabic} ) located in one of my headers into the clipboard using
VBA.
How can I set a range in the header to include just the page field
( {Page \*Arabic} )
The header has the following make-up:
{StyleRef Heading 1\n} {StyleRef Heading 1} Tab Tab {Page
\*Arabic}
I guess the code should start like this but then I am not able to set
the range to include just the page field and copy it into the
clipboard.
Dim rng As Range
Dim sect As Section
Set sect = ActiveDocument.Sections(1)
Set rng = sect.Headers(wdHeaderFooterFirstPage).Range
rng.MoveUntil ???
rng.Copy ????
Help is much appreciated. Thank you very much in advance.Regards,
Andreas