Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word Documents
Need macro to shift to left margin and then indent twice
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="RichardOnRails, post: 5517403"] Hi Suzanne, Thanks for responding. I'm going to apply the same compound style to a number of line-groups in many documents to distinguish code copied from a Command Window as distinguished from comments about the code. Is there a better way than using a macro? a style defined with the appropriate font, indents, etc. Link what? I want code lines to be indented twice, have Courier New 10 point font, and have light-gray background. Where would I get styling that you recommend. How would I get styling that you recommend? I posted a snippet of my macro previously. The entire macro is presented below. Best wishes, Richard Sub IndentCourier10GrayIt() ' ' IndentCourier10GrayIt Macro ' Macro recorded 2/4/2011 by RLMuller ' Selection.Font.Name = "Courier New" Selection.Font.Size = 10 With Selection.ParagraphFormat .LeftIndent = InchesToPoints(-2#) .SpaceBeforeAuto = False .SpaceAfterAuto = False End With Selection.Paragraphs.Indent Selection.Paragraphs.Indent With Selection.ParagraphFormat With .Shading .Texture = wdTextureNone .ForegroundPatternColor = wdColorAutomatic .BackgroundPatternColor = wdColorGray10 End With .Borders(wdBorderLeft).LineStyle = wdLineStyleNone .Borders(wdBorderRight).LineStyle = wdLineStyleNone .Borders(wdBorderTop).LineStyle = wdLineStyleNone .Borders(wdBorderBottom).LineStyle = wdLineStyleNone .Borders(wdBorderHorizontal).LineStyle = wdLineStyleNone With .Borders .DistanceFromTop = 1 .DistanceFromLeft = 4 .DistanceFromBottom = 1 .DistanceFromRight = 4 .Shadow = False End With End With With Options .DefaultBorderLineStyle = wdLineStyleSingle .DefaultBorderLineWidth = wdLineWidth050pt .DefaultBorderColor = wdColorAutomatic End With End Sub [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word Documents
Need macro to shift to left margin and then indent twice
Top