8

When using win32com, something puzzled my.

>>> import win32com
>>> w=win32com.client.Dispatch('Word.Application')

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    w=win32com.client.Dispatch('Word.Application')
AttributeError: 'module' object has no attribute 'client'

what's wrong?

Wilson Cao
  • 81
  • 1
  • 1
  • 3

1 Answers1

20

win32com.client is a module in the win32com package you need to import the actual module.

import win32com.client 

w = win32com.client.Dispatch('Word.Application')
joojaa
  • 4,354
  • 1
  • 27
  • 45
  • 1
    It would help if you told what the error is. Wit h this information alone you can not be helped further. So you need to either expand over ask another question. However this is not a forum but a live FAQ you should post a new question. However this is the answer to the question asked. – joojaa Feb 27 '13 at 15:53