<?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: COM Exception when using Microsoft.Office.Interop.Word in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/com-exception-when-using-microsoft-office-interop-word/m-p/9446841#M35145</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you use COM for driving &lt;EM&gt;Word&lt;/EM&gt; by your add-in, you need &lt;EM&gt;Word&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;Same for COM for Excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why not using Office Open XML?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.ludovicperrichon.com/create-a-word-document-with-openxml-and-c/" target="_blank"&gt;http://www.ludovicperrichon.com/create-a-word-document-with-openxml-and-c/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This way, no Word installation is needed, at all.&lt;/P&gt;&lt;P&gt;Office Open XML can be used for Excel files, too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No need for Office licences if you just want to read or write Office files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
    <pubDate>Thu, 16 Apr 2020 07:10:55 GMT</pubDate>
    <dc:creator>Revitalizer</dc:creator>
    <dc:date>2020-04-16T07:10:55Z</dc:date>
    <item>
      <title>COM Exception when using Microsoft.Office.Interop.Word</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/com-exception-when-using-microsoft-office-interop-word/m-p/9444441#M35144</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I am having a problem with the code in my Revit Add-in. In the code I use the Microsoft.Office.Interop.Word to make some changes in a Word document and then save it. All this works perfectly on my machine and on other 4 test machines. For some reasons one of the users is getting an error:&lt;/P&gt;&lt;P&gt;With Revit 2021:&lt;/P&gt;&lt;P&gt;Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))&lt;/P&gt;&lt;P&gt;With Revit 2020:&lt;/P&gt;&lt;P&gt;Element not found (Exception from HRESULT: 0x8002802B(TYPE_E_ELEMENTNOTFOUND))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On one of the testing machines, the same error occured when Microsoft Offfice was not installed. After installing MS Office the Add-in works as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In know this is not a typical Revit API issue, but maybe some of you already experienced the same error.&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Corinne&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2020 12:05:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/com-exception-when-using-microsoft-office-interop-word/m-p/9444441#M35144</guid>
      <dc:creator>corinne.astori</dc:creator>
      <dc:date>2020-04-15T12:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: COM Exception when using Microsoft.Office.Interop.Word</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/com-exception-when-using-microsoft-office-interop-word/m-p/9446841#M35145</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you use COM for driving &lt;EM&gt;Word&lt;/EM&gt; by your add-in, you need &lt;EM&gt;Word&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;Same for COM for Excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why not using Office Open XML?&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.ludovicperrichon.com/create-a-word-document-with-openxml-and-c/" target="_blank"&gt;http://www.ludovicperrichon.com/create-a-word-document-with-openxml-and-c/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This way, no Word installation is needed, at all.&lt;/P&gt;&lt;P&gt;Office Open XML can be used for Excel files, too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No need for Office licences if you just want to read or write Office files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 07:10:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/com-exception-when-using-microsoft-office-interop-word/m-p/9446841#M35145</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2020-04-16T07:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: COM Exception when using Microsoft.Office.Interop.Word</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/com-exception-when-using-microsoft-office-interop-word/m-p/9447363#M35146</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1103138"&gt;@Revitalizer&lt;/a&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;The user says that he has MS Office installed on his machine! My problem is, the user experiencing the issue is not a “normal” user but an Autodesk employee who is testing my add-in before publishing it. So now my add-in is being hold back because of this error, kind of annoying…&lt;/P&gt;&lt;P&gt;Any other possible causes? Maybe is his MS Office installation corrupted?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also thought of using Office OpenXML instead of the Word Interop, the only disadvantage for my specific needs is that you don’t have the possibility of saving the document file as PDF (as far as I know). But I will think again about this and maybe have to make some compromises.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Corinne&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 11:01:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/com-exception-when-using-microsoft-office-interop-word/m-p/9447363#M35146</guid>
      <dc:creator>corinne.astori</dc:creator>
      <dc:date>2020-04-16T11:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: COM Exception when using Microsoft.Office.Interop.Word</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/com-exception-when-using-microsoft-office-interop-word/m-p/9447464#M35147</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;different Word versions &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 11:45:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/com-exception-when-using-microsoft-office-interop-word/m-p/9447464#M35147</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2020-04-16T11:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: COM Exception when using Microsoft.Office.Interop.Word</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/com-exception-when-using-microsoft-office-interop-word/m-p/9450338#M35148</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1103138"&gt;@Revitalizer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to Microsoft documentation this should not be an issue:&lt;/P&gt;&lt;P&gt;"&lt;EM&gt;If you embed type information from a strong-named managed assembly, you can loosely couple types in an application to achieve version independence. That is, your program can be written to use types from any version of a managed library without having to be recompiled for each new version."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;A href="https://docs.microsoft.com/en-us/dotnet/standard/assembly/embed-types-visual-studio" target="_blank"&gt;https://docs.microsoft.com/en-us/dotnet/standard/assembly/embed-types-visual-studio&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did I missunderstand something?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 12:18:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/com-exception-when-using-microsoft-office-interop-word/m-p/9450338#M35148</guid>
      <dc:creator>corinne.astori</dc:creator>
      <dc:date>2020-04-17T12:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: COM Exception when using Microsoft.Office.Interop.Word</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/com-exception-when-using-microsoft-office-interop-word/m-p/9482340#M35149</link>
      <description>&lt;P&gt;The problem was on the user machine. After he uninstalled MS Office and reinstalled it the error disappeard. Now the add-in works as expected.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 11:21:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/com-exception-when-using-microsoft-office-interop-word/m-p/9482340#M35149</guid>
      <dc:creator>corinne.astori</dc:creator>
      <dc:date>2020-04-30T11:21:03Z</dc:date>
    </item>
  </channel>
</rss>

