Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    May 2006
    Location
    Currently in Europe
    Posts
    103
    Thanks
    7
    Thanked 0 Times in 0 Posts
    I can't find a way to print a list of only my custom styles in a template. (I"ve googled around & found nothing)

    I'm aware of the built-in "print what" selection, but that prints ALL STYLES, which comes to over 20 pages. Poor trees...

    Is there a way of intercepting this command? Does someone have a macro that will do this?

    PS What do the orange boxes to the left of each topic signify?
    Stylus

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts
    [quote name='Stylus' post='760787' date='Feb 24 2009, 09:47 AM'][/quote]
    I can the question about the lounge. The orange box appears to the left of any topic that has replies you haven't read. If you click on the box it will take you to the first unread post in the thread.

    The Word question is a bit harder. Could you take a copy of the template and delete the styles that you don't want printed?

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    There's no built-in support for that, but you can use a macro - see Printing a List of Custom Styles.

    Stuart has answered your question about the orange boxes in the meantime.

  4. #4
    2 Star Lounger
    Join Date
    May 2006
    Location
    Currently in Europe
    Posts
    103
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Mea Culpa - I wasn't clear enough.

    The macro you directed me to prints a list of styles. What I meant was a list of the style definitions. I don't know how to access them in a macro.

    Is there a way?
    Stylus

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    The Style object has properties such as Font and ParagraphFormat, which in turn have other properties, so you could build your own code, e.g.
    Code:
    Sub ListStyles()
      Dim docCur As Document
      Dim docNew As Document
      Dim stl As Style
      Set docCur = ActiveDocument
      Set docNew = Documents.Add
      For Each stl In docCur.Styles
    	If Not stl.BuiltIn Then
    	  docNew.Content.InsertAfter stl.NameLocal
    	  docNew.Content.InsertParagraphAfter
    	  docNew.Content.InsertAfter "Font: " & _
    		stl.Font.Name & " " & stl.Font.Size
    	  docNew.Content.InsertParagraphAfter
    	  docNew.Content.InsertAfter "Line spacing: " & _
    		stl.ParagraphFormat.LineSpacing
    	  docNew.Content.InsertParagraphAfter
    	  docNew.Content.InsertParagraphAfter
    	End If
      Next stl
    End Sub
    Result looks like this:

    Warp
    Font: Arial 14
    Line spacing: 18

    Woof
    Font: Times New Roman 10
    Line spacing: 12


    You can add as many bells and whistles as you like...

Posting Permissions

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