F
Francis Hookam
Required:
To convert selected 10pt paragraphs from aligned left single column to 8pt
two column line between and to end by removing the indent on the first
paragraph. The selected paragraphs are in Normal format and the paragraph
above and below will usually be Heading 1 (so a TOC can be generated on
completion. I want to maintain the Heading 1s above and below the selection
as they are, that is single column stretching right across the page
A dry run works fine so the following macro was recorded (I have comment
blocked as much as I think can be omitted)
When run, the macro converts the whole of the remainder of the document, not
just the selected paragraphs!!!
Since there will be 10-20 separate selections to format this way each month
when I produce the club Newsround it would help to automate the job
Of course, if there were some way of the macro picking out Heading 1s and
then selecting the paras between, converting them and then proceeding down
the document that would be fantastic but I doubt that is possible (and might
take so much time programming as to be not worth bothering with other than
the satisfaction of doing it!)
Many thanks if you can help
Francis Hookham
==========================================
Sub Columns()
With Selection.Font
' .Name = "Arial"
.Size = 8
' .Bold = False
' .Italic = False
' .Underline = wdUnderlineNone
' .UnderlineColor = wdColorAutomatic
' .StrikeThrough = False
' .DoubleStrikeThrough = False
' .Outline = False
' .Emboss = False
' .Shadow = False
' .Hidden = False
' .SmallCaps = False
' .AllCaps = False
' .Color = wdColorAutomatic
' .Engrave = False
' .Superscript = False
' .Subscript = False
' .Spacing = 0
' .Scaling = 100
' .Position = 0
' .Kerning = 0
' .Animation = wdAnimationNone
End With
' If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
' ActiveWindow.Panes(2).Close
' End If
' If ActiveWindow.ActivePane.View.Type <> wdPrintView Then
' ActiveWindow.ActivePane.View.Type = wdPrintView
' End If
With Selection.PageSetup.TextColumns
.SetCount NumColumns:=2
.EvenlySpaced = True
.LineBetween = True
.Width = InchesToPoints(2.76)
.Spacing = InchesToPoints(0.25)
End With
' Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
Selection.ParagraphFormat.Alignment = wdAlignParagraphJustify
Selection.MoveLeft Unit:=wdCharacter, Count:=1
With Selection.ParagraphFormat
.LeftIndent = InchesToPoints(0)
' .RightIndent = InchesToPoints(0)
' .SpaceBefore = 0
' .SpaceBeforeAuto = False
' .SpaceAfter = 0
' .SpaceAfterAuto = False
' .LineSpacingRule = wdLineSpaceSingle
' .Alignment = wdAlignParagraphJustify
' .WidowControl = True
' .KeepWithNext = False
' .KeepTogether = False
' .PageBreakBefore = False
' .NoLineNumber = False
' .Hyphenation = True
' .FirstLineIndent = InchesToPoints(0)
' .OutlineLevel = wdOutlineLevelBodyText
' .CharacterUnitLeftIndent = 0
' .CharacterUnitRightIndent = 0
' .CharacterUnitFirstLineIndent = 0
' .LineUnitBefore = 0
' .LineUnitAfter = 0
End With
End Sub
To convert selected 10pt paragraphs from aligned left single column to 8pt
two column line between and to end by removing the indent on the first
paragraph. The selected paragraphs are in Normal format and the paragraph
above and below will usually be Heading 1 (so a TOC can be generated on
completion. I want to maintain the Heading 1s above and below the selection
as they are, that is single column stretching right across the page
A dry run works fine so the following macro was recorded (I have comment
blocked as much as I think can be omitted)
When run, the macro converts the whole of the remainder of the document, not
just the selected paragraphs!!!
Since there will be 10-20 separate selections to format this way each month
when I produce the club Newsround it would help to automate the job
Of course, if there were some way of the macro picking out Heading 1s and
then selecting the paras between, converting them and then proceeding down
the document that would be fantastic but I doubt that is possible (and might
take so much time programming as to be not worth bothering with other than
the satisfaction of doing it!)
Many thanks if you can help
Francis Hookham
==========================================
Sub Columns()
With Selection.Font
' .Name = "Arial"
.Size = 8
' .Bold = False
' .Italic = False
' .Underline = wdUnderlineNone
' .UnderlineColor = wdColorAutomatic
' .StrikeThrough = False
' .DoubleStrikeThrough = False
' .Outline = False
' .Emboss = False
' .Shadow = False
' .Hidden = False
' .SmallCaps = False
' .AllCaps = False
' .Color = wdColorAutomatic
' .Engrave = False
' .Superscript = False
' .Subscript = False
' .Spacing = 0
' .Scaling = 100
' .Position = 0
' .Kerning = 0
' .Animation = wdAnimationNone
End With
' If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
' ActiveWindow.Panes(2).Close
' End If
' If ActiveWindow.ActivePane.View.Type <> wdPrintView Then
' ActiveWindow.ActivePane.View.Type = wdPrintView
' End If
With Selection.PageSetup.TextColumns
.SetCount NumColumns:=2
.EvenlySpaced = True
.LineBetween = True
.Width = InchesToPoints(2.76)
.Spacing = InchesToPoints(0.25)
End With
' Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
Selection.ParagraphFormat.Alignment = wdAlignParagraphJustify
Selection.MoveLeft Unit:=wdCharacter, Count:=1
With Selection.ParagraphFormat
.LeftIndent = InchesToPoints(0)
' .RightIndent = InchesToPoints(0)
' .SpaceBefore = 0
' .SpaceBeforeAuto = False
' .SpaceAfter = 0
' .SpaceAfterAuto = False
' .LineSpacingRule = wdLineSpaceSingle
' .Alignment = wdAlignParagraphJustify
' .WidowControl = True
' .KeepWithNext = False
' .KeepTogether = False
' .PageBreakBefore = False
' .NoLineNumber = False
' .Hyphenation = True
' .FirstLineIndent = InchesToPoints(0)
' .OutlineLevel = wdOutlineLevelBodyText
' .CharacterUnitLeftIndent = 0
' .CharacterUnitRightIndent = 0
' .CharacterUnitFirstLineIndent = 0
' .LineUnitBefore = 0
' .LineUnitAfter = 0
End With
End Sub