Hsu. Victor (GSM) wrote: > > > 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) >
-2146823114 in hex is 800A1436, which is "this file could not be found". I see that you have misspelled "recipient". Could that be the root cause? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32