Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Dec 2001
    Location
    Reston, Virginia, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Obtaining complete and correct style description o (Word97)

    A textual description of the style of the current paragraph is displayed when:
    (a) using menu to select Format, Style;
    ([img]/forums/images/smilies/cool.gif[/img] using Organizer and selecting a style;
    using the What's This pointer and clicking on a paragraph.
    If the style description is over about 250 characters, the description is truncated, and ends with "...". Is there a way to get a complete textual style description?
    I am trying to produce a window similar to the What's This information, but without any truncation.
    In Word Visual Basic immediate window, I have tried
    "Debug.Print ActiveDocument.Styles(Selection.Style).Description "
    This description is similarly truncated.
    Along the same lines, is it possible to get a textual description of any direct formatting applied to a paragraph or a character?
    In trying to solve this problem, I noticed that two paragraphs in the same document can have the same named paragraph style applied (as reported in the Normal view with a style area), but the What's This style information window reports different Paragraph Formatting, Paragraph Style descriptions, neither of which correctly reflected the actual Paragraph Style definition. (Both of the paragraphs have direct formatting applied, with one formatted as a bullet.) What could cause this?
    Removing the direct paragraph formatting with Ctrl-Q and then checking paragraph formatting with What's This indicated that the direct formatting was removed, and gave the proper style description.

    Thanks for your help,
    Marty

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Obtaining complete and correct style description o (Word97)

    I'm looking at the .Description in Word 2000, and mine are really short. I have seen some long ones now and then, but I'm not sure what causes them; some of the stuff seems totally obvious and unnecessary, and impossible to get rid of!

    As you can imagine, you could build the description manually from the individual properties, comparing the selection's style to the style on which it is based, or combining the two as desired. A lot of work would that be, yes. Not sure it's worthwhile for your application.

  3. #3
    Lounger
    Join Date
    Dec 2001
    Location
    Reston, Virginia, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obtaining complete and correct style description (Word97)

    I am hoping that there is some variation of the VB statement
    <font color=red>ActiveDocument.Styles(Selection.Style).D escription</font color=red>
    that returned more text, or that partial text descriptions could be obtained and concatenated. I really didn't want to go thru each aspect of a style, convert/translate the data to text, and build my own complete style description.
    However, since I have not found anyway to obtain a similar description of direct formatting (any suggestions on that? <img src=/S/igiveup.gif border=0 alt=igiveup width=31 height=23> ), maybe the only alternative is to do a comparison of each aspect of the paragraphs current formatting with the style's formatting, and convert/translate the differences into text. If that problem is licked, the problem of a complete description of a style becomes simple.

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Obtaining complete and correct style description o (Word97)

    I've never seen unnecessary descriptions.
    A style's description lists the base style + differences from the base style.

    Some idiot implementor at MSFT apparently decided to truncate the descriptions at about 255 characters.

  5. #5
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Obtaining complete and correct style description o (Word97)

    Marty,

    If one paragraph is bulleted and the other is not, the What's This window is going to show different things, because the bulleted paragraph will have formatting attributes imposed on it by the list template related to the bullet.

    Seems like you've got two issues, one is returning style information for unnumbered paragraphs, the other is returning style info for numbered paragraphs - I've never been able to sort out the latter.

    If you don't mind sifting through a couple of very long and woolly threads, have a look here and here - you might find some of the code posted useful.

    Gary

Posting Permissions

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