S
Sol Apache
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.
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.