<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
        {font-family:\65B0\7D30\660E\9AD4}
@font-face
        {font-family:\65B0\7D30\660E\9AD4}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:"\@\65B0\7D30\660E\9AD4"}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:72.0pt 90.0pt 72.0pt 90.0pt}
div.WordSection1
        {}
-->
</style>
</head>
<body lang="ZH-TW" link="blue" vlink="purple" style="">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi,</span></p>
<p class="MsoNormal"><span lang="EN-US">        I am trying to use this python sample code to create automatic daily report.</span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="http://bytes.com/topic/python/answers/165364-ms-word-mail-merge-automation">http://bytes.com/topic/python/answers/165364-ms-word-mail-merge-automation</a></span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">but I always failed to open the data source in CSV file. Is this python issue or Windows COM version issue?</span></p>
<p class="MsoNormal"><span lang="EN-US">Anyone knows this?</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">F:\pythonprogram>python WordEmail.py</span></p>
<p class="MsoNormal"><span lang="EN-US">Traceback (most recent call last):</span></p>
<p class="MsoNormal"><span lang="EN-US">  File "WordEmail.py", line 17, in <module></span></p>
<p class="MsoNormal"><span lang="EN-US">    mm.OpenDataSource(data_source_name)</span></p>
<p class="MsoNormal"><span lang="EN-US">  File "C:\Users\VICTOR~1\AppData\Local\Temp\gen_py\2.7\00020905-0000-0000-C000-</span></p>
<p class="MsoNormal"><span lang="EN-US">000000000046x0x8x5\MailMerge.py", line 65, in OpenDataSource</span></p>
<p class="MsoNormal"><span lang="EN-US">    , Connection, SQLStatement, SQLStatement1, OpenExclusive, SubType</span></p>
<p class="MsoNormal"><span lang="EN-US">pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft Word'</span></p>
<p class="MsoNormal"><span lang="EN-US">, u'\u627e\u4e0d\u5230\u6a94\u6848\u3002\r (F:\\Google \u96f2\u7aef\u786c\u789f\</span></p>
<p class="MsoNormal"><span lang="EN-US">\...\\\receipent.csv)', u'wdmain11.chm', 24654, -2146823114), None)</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Victor</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
</div>
<div style="layout-grid:18.0pt; border:dashed 2px gray">
<p style="text-align:justify; text-justify:inter-ideograph; margin:20px 20px 20px 20px">
<span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#17365D"><em>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.
</span></p>
<p align="right" style="text-align:right; margin-right:10px"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#17365D"><em>CCI 2013</span></p>
</div>
</em></em>
</body>
</html>