On Tue, Jun 3, 2008 at 6:14 AM, Thomas Heller <[EMAIL PROTECTED]> wrote: > > I could solve the issue for my machine by repairing the Office 2003 > installation, > the following test script did not work before that and now runs fine. > Whatever this means ;-) > No such luck for me. I am using a corporate install of Word 2002 which has no "Repair" function in the installer. I reinstalled it but without any problem. Funny thing is win32com has no problem accessing Find object (see the interpreter log at end of the mail). I am suspecting a ctypes problem. I have downloaded and built the latest python trunk snapshot and have seen same error there. I lack sufficient skills to use VC2k8 debugger with python. Can you guide me on where to set breakpoint to check out ctypes interaction?
>>> import comtypes.client >>> import win32com >>> import win32com.client >>> w = win32com.client.Dispatch('Word.Application') >>> d = w.Documents.Add() >>> f = d.Content.Find >>> f.Font <win32com.gen_py.None.Font> >>> k = f.Font >>> k.Bold 9999999 >>> wc = comtypes.client.GetActiveObject('Word.Application') >>> dc = wc.Documents[1] >>> fc = dc.Content.Find >>> p = fc.Font Traceback (most recent call last): File "<pyshell#13>", line 1, in <module> p = fc.Font ValueError: Procedure probably called with too many arguments (4 bytes in excess) >>> ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users