[python-win32] OpenDataSource failed in ms-word-mail-merge-automation
Hsu. Victor (GSM)
victor_hsu at Compalcomm.com
Tue Jan 29 05:22:45 CET 2013
Hi,
I am trying to use this python sample code to create automatic daily report.
http://bytes.com/topic/python/answers/165364-ms-word-mail-merge-automation
but I always failed to open the data source in CSV file. Is this python issue or Windows COM version issue?
Anyone knows this?
F:\pythonprogram>python WordEmail.py
Traceback (most recent call last):
File "WordEmail.py", line 17, in <module>
mm.OpenDataSource(data_source_name)
File "C:\Users\VICTOR~1\AppData\Local\Temp\gen_py\2.7\00020905-0000-0000-C000-
000000000046x0x8x5\MailMerge.py", line 65, in OpenDataSource
, Connection, SQLStatement, SQLStatement1, OpenExclusive, SubType
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft Word'
, u'\u627e\u4e0d\u5230\u6a94\u6848\u3002\r (F:\\Google \u96f2\u7aef\u786c\u789f\
\...\\\receipent.csv)', u'wdmain11.chm', 24654, -2146823114), None)
Victor
This message may contain information which is private, privileged or confidential of Compal Communications, Inc. If you are not the intended recipient of this message, please notify the sender and destroy/delete the message. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information, by persons or entities other than the intended recipient is prohibited.
CCI 2013
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20130129/eca5ccde/attachment.html>
More information about the python-win32
mailing list