Hi Mark,

> I got an error with that as well, but I figured out the correct way:
> 
> import win32com.client
> xl = win32com.client.gencache.EnsureDispatch('Excel.Application')
> xl.Visible = True
> xl.Workbooks.Add()
> c = xl.ActiveCell
> c.FormulaR1C1 = 'Hello World'
> c.GetCharacters(1,5).Font.ColorIndex = 3 
> c.GetCharacters(7,5).Font.ColorIndex = 4

thanks for your answer, works like a charm! 

I tried the macro-way as well but stopped because that didn't work.
How/where did you find out the correct way to use this feature
(GetCharacters instead of Characters)? This answer may prevent me from
asking further questions of this kind ;-)

Cheers,
Manuel
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to