> > F:\automation>test2.py > > [(1, 1), (1, 2), (2, 2), (2, 1)] > > Traceback (most recent call last): > > File "F:\automation\test2.py", line 19, in ? > > doc.Selection.Select(selregion,1,0,0) > > File "<COMObject <unknown>>", line 3, in Select > > pywintypes.com_error: (-2147352567, 'Exception occurred.', > (0, 'Adobe > > Photoshop', 'Illegal argument - argument 1\n- Only arrays > > with dimension 1 > > are supported', None, 0, -2147220262), None)
>From the line: > > File "<COMObject <unknown>>", line 3, in Select It appears you are not using 'makepy' for the object (maybe as makepy is not support for that object). If possible, you should try and use a makepy based object. The easiest way is something like: from win32com.client.gencache import EnsureDispatch select = EnsureDispatch(select) # try and convert into makepy based object. If you can get that to work, you might have more luck, as python can determine the exact type of the variant from the type-library. Good luck, Mark _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32