> Read Help on the Dialogs collection.
>
[quoted text clipped - 14 lines]
>>
>> Vince
Hey Klaus, Jezebel,
Thank you for your responses. I get the gist of what you are suggesting. I
would like to explain the problem to you for your expert opinion.
The tool I am developing (called Style Manager) is supposed to scan through an
average 40-page document and analyze the various paragraphs. It will then
assign scores to each paragraph (like Bold = 5 points, Italic = 5 points, Font
Size = {Font Size} points and so forth. After the scores are assigned it will
sort the scores in descending order and group the paragraphs into (say) Main
Title, Sub Title and so on. After the tool guesses the groups, I will need to
style each group. This style should be user defined and stored somewhere so
that I can access it during the style process. I initially started with a
Userform with the font size, Initial Lower case, upper case, color, size and
the basic qualities; however, the users would like the style to contain all
fancy things like Hanging indents, numbered lists and so on. I initially
thought of enhancing the form, recording the qualities in a INI file and
loading it later when the style is applied. But it seemed to me that I would
be better off trying to show Word's style dialog, create a style, store it to
the template and call it back when applying it to the paragraphs. This is why
I asked my earlier question. Of course, the word documents the users get have
no existing styles (like Heading 1) and so forth. They are just in the Normal
Style. In case you need to see some snapshot of it please see
http://techotek.com/snp/stylemanager.htm.
Any ideas on this approach? Hope I've explained it clearly this time.
TIA,
Vince
>Hi Vince,
>
[quoted text clipped - 41 lines]
>>>
>>> Vince
Klaus Linke - 10 Jun 2005 02:25 GMT
Maybe you can use the dialogs FormatFont and FormatParagraph to get the values.
For a sample, see
http://groups-beta.google.com/group/microsoft.public.word.vba.customization/brow
se_frm/thread/1c3d4ed92cf49162/f2d06596ec0e86c4
In Word2003, you'll probably need to .Update the dialog after you .Show it.
You can then use ActiveDocument.Undo to undo the changes that the dialog applied.
In principle, you should be able to just .Display the dialog insted of .Show it, let the user make the choices, and get the values. But that doesn't work (anymore) with most dialogs.
Regards,
Klaus
> Hey Klaus, Jezebel,
>
[quoted text clipped - 72 lines]
>>>>
>>>> Vince