Re: Can i access chartacter formatting properties? by Word
Word
Thu Jul 15 08:23:18 CDT 2004
G'day "Patrick Long" <gavin_mede@hotmail.com>,
there are numerous wdColor constants you can use, or just go fully
custom with (VBA)
Range.Font.Color=RGB(62,25,25)
Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com
steve from wordheretic.com (Email replies require payment)
Patrick Long reckoned:
>I am trying the follwowing code in C#. Range is a Word.Range object filtered
>using Range.Find. I am trying to loop through a document changing the RGB
>color of the font to another colour. I get either a "Server has thrown an
>exception" or value is out of range for this property exception. Has anyone
>has any luck changing the colour?
>
>range.Font.Color = (Word.WdColor)65280
>
>
>
>
>"Patrick Long" <gavin_mede@hotmail.com> wrote in message
>news:%23fuhFKNZEHA.3112@TK2MSFTNGP09.phx.gbl...
>> Thanks Steve
>> "Word Heretic" <myfullname@tpg.com.au> wrote in message
>> news:k06pe0d1si1s47qv47l5jfrbpo4icd5otl@4ax.com...
>> > G'day "Patrick Long" <gavin_mede@hotmail.com>,
>> >
>> > SomeRange.Characters(1).Font...
>> >
>> >
>> > Steve Hudson - Word Heretic
>> > Want a hyperlinked index? S/W R&D? See WordHeretic.com
>> >
>> > steve from wordheretic.com (Email replies require payment)
>> >
>> >
>> > Patrick Long reckoned:
>> >
>> > >Can i use the Word COM API or VBA macro to read and update formatting
>> data
>> > >such as font colour on individual colours?
>> > >
>> > >TIA
>> > >
>> > >Pat Long
>> > >
>> >
>>
>>
>