<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: REST service cannot access MicroSoft Word via Python in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-service-cannot-access-microsoft-word-via/m-p/489009#M2347</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Solution:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have to add arcgissoc user to DCOM config on the arcgis server. Allow permissions to allow local/remote launch, local/remote activation, and local/remote access permission.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ryan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 May 2012 18:43:04 GMT</pubDate>
    <dc:creator>RyanKelley</dc:creator>
    <dc:date>2012-05-30T18:43:04Z</dc:date>
    <item>
      <title>REST service cannot access MicroSoft Word via Python</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-service-cannot-access-microsoft-word-via/m-p/489008#M2346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My script calls Microsoft Word (win32com.client.Dispatch("Word.Application")) but fails.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can run the script as myself and on the same server ArcGIS server is using, which tells me Word is on the server. But, when I run the script from the REST endpoint, I believe I get a permissions problem. Error below.&amp;nbsp; I believe permissions have been set properly for the soc/som user to access these libraries. COM issue? Thought I'd take a shot in the dark by posting here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;line 241, in wordapp = win32com.client.Dispatch("Word.Application") File "C:\Python26\ArcGIS10.0\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx) File "C:\Python26\ArcGIS10.0\lib\site-packages\win32com\client\dynamic.py", line 98, in _GetGoodDispatchAndUserName return (_GetGoodDispatch(IDispatch, clsctx), userName) File "C:\Python26\ArcGIS10.0\lib\site-packages\win32com\client\dynamic.py", line 78, in _GetGoodDispatch IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch) com_error: (-2147024891, 'Access is denied.', None, None) (-2147024891, 'Access is denied.', None, None)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ryan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2012 15:03:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-service-cannot-access-microsoft-word-via/m-p/489008#M2346</guid>
      <dc:creator>RyanKelley</dc:creator>
      <dc:date>2012-05-25T15:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: REST service cannot access MicroSoft Word via Python</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-service-cannot-access-microsoft-word-via/m-p/489009#M2347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Solution:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have to add arcgissoc user to DCOM config on the arcgis server. Allow permissions to allow local/remote launch, local/remote activation, and local/remote access permission.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ryan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 18:43:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-service-cannot-access-microsoft-word-via/m-p/489009#M2347</guid>
      <dc:creator>RyanKelley</dc:creator>
      <dc:date>2012-05-30T18:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: REST service cannot access MicroSoft Word via Python</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-service-cannot-access-microsoft-word-via/m-p/489010#M2348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;However, I cannot get ArcServer to populate Documents.Open(filename) - it populates this as None. ???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sample:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import win32com.client, sys, arcpy, os, string&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;wordapp = win32com.client.Dispatch("Word.Application")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;wordapp.Visible = 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;docname = r"Y:\blank.docx"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;worddoc = wordapp.Documents.Open(docname)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage(worddoc)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; worddoc = None # aka stuck&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This does not happen in PyWin on the server, in ArcMap or any other way I've tried. worddoc is always populated correctly. It only fails when running from REST.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas????????????&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 18:49:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-service-cannot-access-microsoft-word-via/m-p/489010#M2348</guid>
      <dc:creator>RyanKelley</dc:creator>
      <dc:date>2012-05-30T18:49:29Z</dc:date>
    </item>
  </channel>
</rss>

