On 6/17/05, Hughes, Chad O <[EMAIL PROTECTED]> wrote: > > I have posed a more complete answer to your question, however, it is quite a > large and It is awaiting approval. For now, xlRight = -4152. You can find > this out by opening up Excel and typing the ALT-F11 combination. From there > use the ObjectBrowser. For example if you type in the word "xlRight" you > will see that it is equal to -4152.
I've had problems with these constants differing between versions before, so I don't recommend hard coding them. (This was in Word rather than Excel, AFAICR, but if Bill can do it to us once, he can do it to us twice.) Luckily, you can use the constants by name: PythonWin 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32. Portions Copyright 1994-2004 Mark Hammond ([EMAIL PROTECTED]) - see 'Help/About PythonWin' for further copyright information. >>> import win32com.client >>> excel = win32com.client.gencache.EnsureDispatch("Excel.Application") >>> win32com.client.constants.xlRight -4152 -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list