I'm trying to navigate through the Word object model to find the properties
of the Normal style used for that document - particularly the font name and
font size. I'm trying to do this for a large number of documents, so instead
of doing it manually, I want to navigate the object model from a VB
application. But I haven't found a way to get to the Normal style and it's
properties yet.

Does anyone know how to do this?

Thanks,
Dave P.

Re: Getting propertys of the Normal style by Greg

Greg
Fri Feb 02 11:38:27 CST 2007

Do you mean something like this:

Sub Test()
Dim oStyle As Style
Set oStyle = ActiveDocument.Styles("Normal")
With oStyle
MsgBox .Font.Name
MsgBox .Font.Size
End With
End Sub


On Feb 2, 11:58 am, DaveP <D...@discussions.microsoft.com> wrote:
> I'm trying to navigate through the Word object model to find the properties
> of the Normal style used for that document - particularly the font name and
> font size. I'm trying to do this for a large number of documents, so instead
> of doing it manually, I want to navigate the object model from a VB
> application. But I haven't found a way to get to the Normal style and it's
> properties yet.
>
> Does anyone know how to do this?
>
> Thanks,
> Dave P.



Re: Getting propertys of the Normal style by Shauna

Shauna
Fri Feb 02 17:56:01 CST 2007

Hi Greg, Dave

I would not want to rely on the Normal style being called "Normal".

I'd suggest
Set oStyle = ActiveDocument.Styles(wdStyleNormal)

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


"Greg Maxey" <gmaxey@mvps.org> wrote in message
news:1170437907.574307.326500@s48g2000cws.googlegroups.com...
> Do you mean something like this:
>
> Sub Test()
> Dim oStyle As Style
> Set oStyle = ActiveDocument.Styles("Normal")
> With oStyle
> MsgBox .Font.Name
> MsgBox .Font.Size
> End With
> End Sub
>
>
> On Feb 2, 11:58 am, DaveP <D...@discussions.microsoft.com> wrote:
>> I'm trying to navigate through the Word object model to find the
>> properties
>> of the Normal style used for that document - particularly the font name
>> and
>> font size. I'm trying to do this for a large number of documents, so
>> instead
>> of doing it manually, I want to navigate the object model from a VB
>> application. But I haven't found a way to get to the Normal style and
>> it's
>> properties yet.
>>
>> Does anyone know how to do this?
>>
>> Thanks,
>> Dave P.
>
>



Re: Getting propertys of the Normal style by Greg

Greg
Fri Feb 02 18:46:54 CST 2007

Shauna,

Mine is ;-). But then I hardly ever use Word for word processing. I agree
with your suggestion.

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


Shauna Kelly wrote:
> Hi Greg, Dave
>
> I would not want to rely on the Normal style being called "Normal".
>
> I'd suggest
> Set oStyle = ActiveDocument.Styles(wdStyleNormal)
>
> Hope this helps.
>
> Shauna Kelly. Microsoft MVP.
> http://www.shaunakelly.com/word
>
>
> "Greg Maxey" <gmaxey@mvps.org> wrote in message
> news:1170437907.574307.326500@s48g2000cws.googlegroups.com...
>> Do you mean something like this:
>>
>> Sub Test()
>> Dim oStyle As Style
>> Set oStyle = ActiveDocument.Styles("Normal")
>> With oStyle
>> MsgBox .Font.Name
>> MsgBox .Font.Size
>> End With
>> End Sub
>>
>>
>> On Feb 2, 11:58 am, DaveP <D...@discussions.microsoft.com> wrote:
>>> I'm trying to navigate through the Word object model to find the
>>> properties
>>> of the Normal style used for that document - particularly the font
>>> name and
>>> font size. I'm trying to do this for a large number of documents,
>>> so instead
>>> of doing it manually, I want to navigate the object model from a VB
>>> application. But I haven't found a way to get to the Normal style
>>> and it's
>>> properties yet.
>>>
>>> Does anyone know how to do this?
>>>
>>> Thanks,
>>> Dave P.



Re: Getting propertys of the Normal style by DaveP

DaveP
Mon Feb 05 16:30:00 CST 2007

Thanks Greg. Thanks Shauna. Your suggestions helped me do what I needed.

"Greg Maxey" wrote:

> Shauna,
>
> Mine is ;-). But then I hardly ever use Word for word processing. I agree
> with your suggestion.
>
> --
> Greg Maxey/Word MVP
> See:
> http://gregmaxey.mvps.org/word_tips.htm
> For some helpful tips using Word.
>
>
> Shauna Kelly wrote:
> > Hi Greg, Dave
> >
> > I would not want to rely on the Normal style being called "Normal".
> >
> > I'd suggest
> > Set oStyle = ActiveDocument.Styles(wdStyleNormal)
> >
> > Hope this helps.
> >
> > Shauna Kelly. Microsoft MVP.
> > http://www.shaunakelly.com/word
> >
> >
> > "Greg Maxey" <gmaxey@mvps.org> wrote in message
> > news:1170437907.574307.326500@s48g2000cws.googlegroups.com...
> >> Do you mean something like this:
> >>
> >> Sub Test()
> >> Dim oStyle As Style
> >> Set oStyle = ActiveDocument.Styles("Normal")
> >> With oStyle
> >> MsgBox .Font.Name
> >> MsgBox .Font.Size
> >> End With
> >> End Sub
> >>
> >>
> >> On Feb 2, 11:58 am, DaveP <D...@discussions.microsoft.com> wrote:
> >>> I'm trying to navigate through the Word object model to find the
> >>> properties
> >>> of the Normal style used for that document - particularly the font
> >>> name and
> >>> font size. I'm trying to do this for a large number of documents,
> >>> so instead
> >>> of doing it manually, I want to navigate the object model from a VB
> >>> application. But I haven't found a way to get to the Normal style
> >>> and it's
> >>> properties yet.
> >>>
> >>> Does anyone know how to do this?
> >>>
> >>> Thanks,
> >>> Dave P.
>
>
>