Voici la procédure pour générer une liste des fonctions et des constantes pouvant être utilisé avec la librairie win32com.
1)Installer win32com
2)Executer le script makepy.py dans le répertoire : PythonX.X\Lib\site-packages\win32com\client
3)Récupérer le fichier .py créer dans le répertoire PythonX.X\Lib\site-packages\win32com\gen_py (prendre le fichier le plus récent car le nom est composé de chiffre et de lettre). Son contenu contient une liste des fonctions et constante requise pour contrôle une application.
exemple
# -*- coding: mbcs -*-
# Created by makepy.py version 0.4.95
# By python version 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
# From type library ‘EXCEL.EXE’
# On Wed Oct 31 07:55:10 2007
“”"Microsoft Excel 10.0 Object Library”"”
makepy_version = ‘0.4.95′
python_version = 0×20501f0
import win32com.client.CLSIDToClass, pythoncom
import win32com.client.util
from pywintypes import IID
from win32com.client import Dispatch
# The following 3 lines may need tweaking for the particular server
# Candidates are pythoncom.Missing, .Empty and .ArgNotFound
defaultNamedOptArg=pythoncom.Empty
defaultNamedNotOptArg=pythoncom.Empty
defaultUnnamedArg=pythoncom.Empty
CLSID = IID(’{00020813-0000-0000-C000-000000000046}’)
MajorVersion = 1
MinorVersion = 4
LibraryFlags = 8
LCID = 0×0
class constants:
xl3DBar =-4099 # from enum Constants
xl3DEffects1 =0xd # from enum Constants
xl3DEffects2 =0xe # from enum Constants
xl3DSurface =-4103 # from enum Constants
…..
