ich habe das Problem, dass anscheinend nicht alle Konstanten aus "from win32com.client import constants" geladen werden bzw. nicht implementiert sind.
Code: Alles auswählen
WordApplication.Selection.GoTo(constants.wdGoToBookmark, Name = 'Metrics')
ExcelWorksheetJobList.Cells(1, 2).Validation.Add(Type = constants.xlValidateList , Formula1="=authors")
Bei der unteren Anweisung meckert er jedoch:
Für mich heißt das, dass er die Konstante nicht findet und deswegen den AttributeError raist.File "C:\Python.2.4\Lib\site-packages\win32com\client\__init__.py", line 173,
in __getattr__
raise AttributeError, a
AttributeError: xlValidateList
Ich weiß zwar, dass die Konstante "xlValidateList" den Wert 3 hat, jedoch hilft mir das auch nicht weiter.
Über Hilfe wäre ich sehr dankbar.
[edit] Ich nutze übrigens Python2.4, falls das interessiert.