Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-25-2012, 09:52 AM
sinbad sinbad is offline Coding into a macro a carriage return Windows 7 32bit Coding into a macro a carriage return Office 2010 32bit
Novice
Coding into a macro a carriage return
 
Join Date: Feb 2012
Posts: 2
sinbad is on a distinguished road
Default Coding into a macro a carriage return

I can't find a way to put two lines into a header via a macro. I want to say, Put this text in the header .... 'header text header text'
And put these full points underneath '..................................'
So it's a two-line header.

My macro doesn't work this way ....
Quote:
Sub HeaderFooterObjectBest_English()
Dim MyText As String
MyHeaderText = "..........................."
MyHeaderText = "Paul | new words for the week | Best-English.org | 1 of 1"
MyFooterText = "Best-English dot org"


Selection.Font.Name = "Courier New"
Selection.Font.Size = 9
With ActiveDocument.Sections(1)
.Headers(wdHeaderFooterPrimary).Range.Text = MyHeaderText
.Footers(wdHeaderFooterPrimary).Range.Text = MyFooterText
End With
End Sub
Be very grateful for guidance.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Coding into a macro a carriage return Paragraph (carriage) return font size revrossreddick Word 2 12-28-2011 01:33 PM
Coding into a macro a carriage return Converting data-table into coding text 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

Other Forums: Access Forums

All times are GMT -7. The time now is 03:44 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft