Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Feb 2003
    Location
    Auckland, New Zealand
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Outline printing (Word 2003)

    Is it possible to print an outline from a selected level upwards? I'm producing a manual. The upper levels will make a good quick reference handbook suitable for individual copies. For those who want to know the "why" behind the "what", a single copy in each office containing all levels will give the explanations in body text. Or is there another way of achieving the goal?

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Outline printing (Word 2003)

    There is some sample code attached to <post#=301140>post 301140</post#> that will copy all content at or below a specified Outline level to a brand new document. It would be very easy to adapt this to copy content at or above the specified level. You could then use that or automatically print and delete the new document.

    StuartR

  3. #3
    3 Star Lounger
    Join Date
    Apr 2004
    Location
    Boston, Massachusetts, USA
    Posts
    389
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outline printing (Word 2003)

    Hi David,

    The following macro will copy all the content at or above the specified outline level to a new document (the default is level 4).

    <pre>Sub MakeOutlineOnlyCopyOfCurrentDoc()
    Dim docFull As Document
    Dim docOutline As Document
    Dim lngMaxLevel As Integer
    Dim strUserInput As String
    Dim para As Paragraph

    lngMaxLevel = 4
    Set docFull = ActiveDocument
    Application.ScreenUpdating = False

    Do
    strUserInput = InputBox("Create an outline-only copy of this document " & _
    "to what level (1-9)?", _
    "Outline Maker", _
    lngMaxLevel)
    If Len(strUserInput) = 0 Then Exit Sub

    If Not strUserInput Like "[1-9]" Then
    MsgBox Chr(34) & strUserInput & Chr(34) & " is not a valid Outline Level.", _
    vbInformation
    End If
    Loop Until strUserInput Like "[1-9]"

    lngMaxLevel = CLng(strUserInput)

    Set docOutline = Documents.Add
    StatusBar = "Collecting outline information. Please wait ..."

    For Each para In docFull.Paragraphs
    If para.OutlineLevel <= lngMaxLevel Then
    para.Range.Copy
    docOutline.Range(docOutline.Range.End - 1).Paste
    End If
    Next para

    StatusBar = ""
    docOutline.Activate
    Application.ScreenUpdating = True
    End Sub
    </pre>


  4. #4
    3 Star Lounger
    Join Date
    Apr 2004
    Location
    Boston, Massachusetts, USA
    Posts
    389
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outline printing (Word 2003)

    As for just printing at or above a certain level, when you print from Outline View, only the text that is displayed prints. Just adjust outline view to show only the levels you want, and then print it (btw, Print Preview won't display correctly when you do this).

  5. #5
    New Lounger
    Join Date
    Feb 2003
    Location
    Auckland, New Zealand
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outline printing (Word 2003)

    Thanks for that. I use page breaks to separate sections and printing as suggested observes the breaks, giving me just about as many pages as printing the entire manual. What I want to do is have the outline text print as it appears on the screen, but more elegantly than print "selection". I find that changing to outline view sometimes leaves fragments of text from lower levels that would give an incorrect result from print selection.

  6. #6
    New Lounger
    Join Date
    Feb 2003
    Location
    Auckland, New Zealand
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outline printing (Word 2003)

    That works a treat. It gives me the requested level UP, not down, but UP is just what I need. Thanks.

  7. #7
    New Lounger
    Join Date
    Feb 2003
    Location
    Auckland, New Zealand
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Outline printing (Word 2003)

    Thanks. It does just what I need. I appreciate your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •