To list available constants, you can do something like:
import win32com
for k, v in win32com.client.constants.__dicts__[0].items():
print("{:<45}: {}".format(k, v))
# __module__ : win32com.gen_py.00020813-0000-0000-C000-000000000046x0x1x9
# xl3DBar : -4099
# xl3DEffects1 : 13
# xl3DEffects2 : 14
# xl3DSurface : -4103
# ...
The best resource for pywin32, even in 2020 (16+ years after its creation), is the source code1.
It turns out that win32com.client.constants is an instance of the Constants class:
class Constants:
"""A container for generated COM constants.
"""
def __init__(self):
self.__dicts__ = [] # A list of dictionaries
def __getattr__(self, a):
for d in self.__dicts__:
if a in d:
return d[a]
raise AttributeError(a)
# And create an instance.
constants = Constants()
The constants are all stored in self.__dicts__ which is a list of dictionaries. That list happens to contain only a single dictionary.
Knowing this, you can iterate through the dictionary (as done above) to see what constants are available.
1 For dead links, try The Internet Archive's Wayback Machine. There are plugins for various browsers which make searching for archived versions of a page easy or automatic.