Can i access chartacter formatting properties?

P

Patrick Long

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
 
W

Word Heretic

G'day "Patrick Long" <[email protected]>,

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:
 
P

Patrick Long

Thanks Steve
Word Heretic said:
G'day "Patrick Long" <[email protected]>,

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:
 
P

Patrick Long

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
 
W

Word Heretic

G'day "Patrick Long" <[email protected]>,

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:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top