![]() |
#2
|
||||
|
||||
![]()
You can work with the range object directly to easily add a return (paragraph mark):
Code:
Sub AddTwoLinesToHeader() Dim r As Range Set r = ActiveDocument.Sections(1).Headers _ (wdHeaderFooterPrimary) _ .Range.Duplicate r.Text = "" 'clear header content With r .InsertAfter "This is some text." .InsertParagraphAfter .InsertAfter "This is a new para." End With End Sub
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
revrossreddick | Word | 2 | 12-28-2011 01:33 PM |
![]() |
niuri_cigarete | Excel | 2 | 12-10-2011 02:57 AM |
Extreme Color Coding Outlook | boodmatt | Outlook | 0 | 06-27-2011 02:13 AM |
Return to in box | cjwilson2740 | Outlook | 0 | 04-05-2010 02:27 PM |
Carriage Return Help | UCHelp | Word | 1 | 04-04-2010 10:11 PM |