[python-win32] Help needed on Dispatch

2012-05-11 Thread Rohit.Nirantar
Hi All, I am getting error while trying to execute code: from win32com.client import Dispatch xlApp = Dispatch("Excel.Application") DispatchC:\Python27\lib\site-packages\win32com\client\__init__.py 95 _GetGoodDispatchAndUserName C:\Python27\lib\site-packages\win32com\client\d

Re: [python-win32] Help needed on Dispatch

2012-05-11 Thread Tim Roberts
rohit.niran...@wellsfargo.com wrote: > Hi All, > > I am getting error while trying to execute code: > > from win32com.client import Dispatch > xlApp = Dispatch("Excel.Application") > > Dispatch > C:\Python27\lib\site-packages\win32com\client\__init__.py > 95 > _G

Re: [python-win32] speed up win32com.client

2012-05-11 Thread Mark Hammond
On 10/05/2012 12:33 AM, Tom wrote: Sorry to interject here but I have a question along the same vein: If I have a script (in this case that interacts with Word through win32com.client) with statements like this: doc.ActiveWindow.Selection.BoldRun() doc.ActiveWindow.Selection.TypeText(_type) doc.A

Re: [python-win32] speed up win32com.client

2012-05-11 Thread Mark Hammond
On 10/05/2012 6:38 AM, DANIEL POSE wrote: I have read about Early Binding but I hadn't tested the line that you reference: acad= win32com.client.gencache.EnsureDispatch("AutoCAD.Application") For my surprise, if I replace line: acad= win32com.client.Dispatch("AutoCAD.Application") for the line

Re: [python-win32] Help needed on Dispatch

2012-05-11 Thread Mark Hammond
Or as a follow-up to Tim's response, the other likely scenario is that you have a 32bit Excel but a 64bit Python. So if that sounds likely, just remove the 64bit Python and use a 32bit version. Cheers, Mark On 11/05/2012 2:02 PM, rohit.niran...@wellsfargo.com wrote: Hi All, I am getting err