Hello
I have a macro which places text from a userform into various parts of a
document and (amazingly) it works except for one line which is to change the
style of a paragraph in the primary header of Section 2. This part works:
.Headers(wdHeaderFooterFirstPage).Range.Text = TxtReportTitle
.Headers(wdHeaderFooterPrimary).Range.Text = TxtReportTitle + Chr(13) +
"Table of Contents (continued)"
But this line doesn¹t:
'Selection.Style ActiveDocument.Styles("TOC continued")
All I want to do is change the Chr(13) and the next line into the
abovementioned style. I have tried changing ³Selection² to ³Range² but that
doesn¹t work either.
Can someone help me with the correct VB syntax for this?
Also, I¹d like to add a manual line break (^l) into my macro but I don¹t
know what the CHR code for that is. I understand that chr(13) is for
paragraph breaks (^p).
Thanks for any help.
Jezebel - 23 Aug 2005 21:59 GMT
.Headers(wdHeaderFooterFirstPage).Range.Paragraphs(2).Style = "TOC
continued"
> Hello
>
[quoted text clipped - 22 lines]
>
> Thanks for any help.
Sol Apache - 24 Aug 2005 00:30 GMT
Thank you very much, this works!
On 23/8/05 21:59, in article uy8bYWCqFHA.3520@tk2msftngp13.phx.gbl,
> .Headers(wdHeaderFooterFirstPage).Range.Paragraphs(2).Style = "TOC
>
[quoted text clipped - 26 lines]
>>
>> Thanks for any help.