Нет microsoft office interop word

I am developing an application which will send emails using C#. The app will be able to use templates for mail, among other things. The problem is I’m having trouble finding any Office.Interop references, which means I cannot work with Outlook.

Office is installed on my computer, but I’ve also tried to install the PIA from this link http://www.microsoft.com/en-us/download/details.aspx?id=3508. Unfortunately, this didn’t change anything: When I launch the MSI it stops without a word, and I don’t know if that is part of the problem.

Kjartan's user avatar

Kjartan

18.4k15 gold badges74 silver badges93 bronze badges

asked Feb 24, 2014 at 11:23

T2o's user avatar

2

Look for them under COM when trying to add the references. You should find the reference below, and possibly Microsoft Outlook 15.0 Object Library, if you need that. There are similar libraries for Word, Excel, etc.:

enter image description here

Update: The Object Library should contain the Interop stuff. Try to add this to a source file and see if it can now find what you need:

using Microsoft.Office.Interop.Outlook;

enter image description here

answered Feb 24, 2014 at 11:30

Kjartan's user avatar

KjartanKjartan

18.4k15 gold badges74 silver badges93 bronze badges

6

I forgot to select Microsoft Office Developer Tools for installation initially. In my case Visual Studio Professional 2013 and also 2015.

enter image description here

answered Dec 4, 2014 at 2:52

Matthew Lock's user avatar

Matthew LockMatthew Lock

12.9k12 gold badges90 silver badges128 bronze badges

1

If you’re using Visual Studio 2015 and you’re encountering this problem, you can install MS Office Developer Tools for VS2015 here.

answered Jul 27, 2015 at 8:01

Phileo99's user avatar

Phileo99Phileo99

5,5312 gold badges47 silver badges54 bronze badges

1

With Visual Studio 2015 I have activated it with the following steps.

  1. Programs and Features —> Select Visual Studio > Change
  2. Choose Modify
  3. Windows and Webdevelopment —> Tick/select «Microsoft Office Developer Tools»
  4. Start Update

It should work now.

Kjartan's user avatar

Kjartan

18.4k15 gold badges74 silver badges93 bronze badges

answered Jun 16, 2016 at 8:28

LuckyLikey's user avatar

LuckyLikeyLuckyLikey

3,4541 gold badge31 silver badges53 bronze badges

You can find it at link:

C:WindowsassemblyGAC_MSILMicrosoft.Office.Interop.Word15.0.0.0__71e9bce111e9429cMicrosoft.Office.Interop.Word.dll

Browse it then add references

answered Oct 6, 2016 at 7:34

Tung Ha's user avatar

Tung HaTung Ha

1312 silver badges7 bronze badges

3

If you have installed latest Visual studio and want to
To locate library of Microsoft.Office.Interop.Outlook or any other Microsoft.Office.Interop library then you should look into below 2 folders:

C:Program Files (x86)Microsoft Visual Studio 12.0Visual Studio Tools for OfficePIAOffice14

C:Program Files (x86)Microsoft Visual Studio 12.0Visual Studio Tools for OfficePIAOffice15

Please note that folder could be C:Program Files

Manos Nikolaidis's user avatar

answered Oct 19, 2015 at 16:30

Amit's user avatar

AmitAmit

615 bronze badges

I think you need to run that .msi to install the dlls. After I ran that .msi I can go to (VS 2012) Add References > Assemblies > Extensions and all of the Microsoft.Office.Interop dlls are there.

On my computer the dlls are found in «c:Program Files(x86)Microsoft Visual Studio 12.0Visual Studio Tools for OfficePIA» so you could check in a similar/equivalent directory on yours just to make sure they’re not there?

answered Feb 24, 2014 at 11:36

John Darvill's user avatar

John DarvillJohn Darvill

1,25411 silver badges17 bronze badges

2

Just doing like @Kjartan.

Steps are as follows:

  1. Right click your C# project name in Visual Studio’s «Solution Explorer»;

  2. Then, select «add -> Reference -> COM -> Type Libraries » in order;

  3. Find the «Microsoft Office 16.0 Object Library», and add it to reference (Note: the version number may vary with the OFFICE you have installed);

  4. After doing this, you will see «Microsoft.Office.Interop.Word» under the «Reference» item in your project.

answered Dec 9, 2018 at 16:22

Chengshuang Li's user avatar

RRS feed

  • Remove From My Forums
  • Question

  • I have read a lot way to solve this problem, but still can’t find it.

    My pc is win10 & visual studio 2017.

    I can find it in the C:Windowsassembly. Does it means I have installed?

Answers

  • Did you install the Visual Studio Tools for Office?

    — Wayne

    • Marked as answer by
      Chien-Wei
      Thursday, September 13, 2018 4:18 AM

All replies

  • Hi,

    .net 4.0 or later version added reference, if it is not 4.0 or above, there may not be this, you can download a Microsoft.Office.Interop.Word.dll by yourself.

    In your project, right-click on «References» and select «Add» .

    Imports Microsoft.Office.Interop.Word

    Best Regards,

    Alex


    MSDN Community Support Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any
    compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by
      Chien-Wei
      Wednesday, September 12, 2018 11:50 AM
    • Unmarked as answer by
      Chien-Wei
      Wednesday, September 12, 2018 11:50 AM

  • With VS 2015, Office 2016, I add the Object Library :

  • There are times when an assembly will not show up and you need to browse for them. Browse under were the bold parts reflect which version of Office is installed.

    C:Program Files (x86)Microsoft Visual Studio 14.0Visual Studio Tools for OfficePIAOffice15.

    You can also add them to «Custom Component Set» in Object Browser (the default hot key is F2). Once added select that library and press the button where the arrow is indicating. 

    I this for all the ones shown as I use them often.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via
    my MSDN profile but will not answer coding question on either.
    VB Forums — moderator

    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

  • HI,Alex-Li-MSFT

    I check my project is .net4.5.2 , but I can’t find the microsoft.office.interop.word in the VS assemblies.

    Is it any possible that my office is o365 cause the problem?

    Thanks for your reply.

    • Edited by
      Chien-Wei
      Wednesday, September 12, 2018 11:51 AM

  • Hi, Casorix31

    I have add this com already, but there are some code error.

    I try to add a table in the document,but error shows tables are not the member of document.

    I search this problem and they tell me I need to add microsoft.office.interop.word first.

    Thanks for your reply.

    • Edited by
      Chien-Wei
      Wednesday, September 12, 2018 11:52 AM

  • Did you install the Visual Studio Tools for Office?

    — Wayne

    • Marked as answer by
      Chien-Wei
      Thursday, September 13, 2018 4:18 AM

  • Hi, WayneAKing

    Thanks for your help, I finally find it.

  • Hi,

    I am glad you have got your solution, we appreciated you shared us your solution and mark it as an answer.

    Best Regards,

    Alex


    MSDN Community Support Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any
    compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

Студворк — интернет-сервис помощи студентам

Добрый день!

Сижу уже несколько дней с одной проблемой:

Нужно доработать программу выгрузки отчетности на C#

1) Установил Visual Studio Ultimate 2013 (лицензионная);
2) Открываю проект ругается:
Не найден компонент «Microsoft.Office.Interop.Excel», на который указывает ссылка.
Не найден компонент «Microsoft.Office.Core», на который указывает ссылка.

В References проекта эти две библиотеки не видит

Обновлял Visual studio
Обновлял Office
Обновлял FrameWork
Чистил место и 7 раз полностью переутсанавливал среду

В обновлениях видно, что необходимые библиотеки присутствуют..Visual Studio их просто не воспринимает..

Как ещё подступиться? Что ещё можно сделать?

Спасибо!

5 ответов

вам может потребоваться установка сборок отдельно, если вы не решили устанавливать их во время установки вашего офиса.

MSDN:

Необходимо установить первичные сборки Microsoft Office (PIA) в глобальном кэше сборки вашего компьютера разработки прежде чем вы сможете выполнить определенные задачи разработки. Как правило, PIAs устанавливаются автоматически при установке Office на компьютер разработки. Однако в некоторых случаях вам может потребоваться установить PIA отдельно.

Подробнее здесь

Prabhu Murthy
17 апр. 2013, в 09:31

Поделиться

Вам нужно Microsoft Word xx Object Library.

Изображение 142064

Mike Chaliy
17 апр. 2013, в 08:15

Поделиться

Vadois
24 окт. 2013, в 18:26

Поделиться

Вы также можете использовать диспетчер пакетов NuGet для установки ссылки.
Перейдите в Project → Управление пакетами NuGet…
Найдите «Interop.Word» и установите этот пакет.

Изображение 142065
Хорошо, что вам не нужно думать о том, где находится dll. Когда другой человек проверит решение, NuGet получит все необходимые пакеты на свою машину.

Roman
18 окт. 2017, в 22:50

Поделиться

Проверьте, присутствует ли библиотека (Microsoft.Office.Interop.word) в папке сборки окон (C:Windowsassembly), которую вы можете установить из http://www.microsoft.com/en-us/download/details.aspx?id=3508

Теперь вам просто нужно найти его в своей визуальной студии.

Щелкните правой кнопкой мыши на consoleApplication (или имя вашего приложения) в окне SolutionExplorer и

Перейдите в меню Добавить → Ссылки- > Обзор и найдите C:WindowsassemblyGAC_MSILMicrosoft.Office.Interop.word или аналогичный каталог.
нажмите ok, и теперь вы можете использовать библиотеку в своем приложении.

alphaguy
02 июнь 2017, в 12:47

Поделиться

Ещё вопросы

  • 0Включить jQuery в файл JS
  • 1Когда я должен создать экземпляр класса Activity?
  • 0Вкладки jQuery, вызывающие ошибку обратной передачи
  • 1Сохранить MS ACCESS вложения с Python
  • 0Как уменьшить div, который содержит текст?
  • 1Пример лицензирования рынка всегда получает лицензию
  • 0Как передать параметры из класса в угловую область видимости
  • 1Как я должен динамически добавлять и удалять данные из модального в Vue?
  • 0Есть ли способ вызвать вызов JavaScript API, так как мы можем использовать вызов curl PHP?
  • 1Jasper: компилирование одного и того же файла jrxml в несколько форматов вывода
  • 1Как я могу определить, когда окно консоли моего приложения получает или теряет фокус?
  • 1Правильный способ использования обещания. Все, и ждите, чтобы пройтись по списку файловых операций
  • 1HTTP POST в Espruino для микроконтроллеров
  • 0Необходимо добавить значение, чтобы заполнить раскрывающийся список с помощью ручных данных
  • 0Какие моменты ускоряют выполнение SQL-запросов
  • 0Объект OpenGl не отображается, связанный с шейдером
  • 0Присоединиться к подзапросу с другой таблицей
  • 1Объедините результаты нескольких вызовов API Node.js
  • 1Временная сложность алгоритма в питоне O (n log n)
  • 1HelperTestRunner из RobolectricTestRunner не может вызвать Jmockit?
  • 0Установить фокус после определенного элемента в поле ввода в jquery / javascript
  • 1Переместить файл после успешной передачи FTP с использованием Java DSL
  • 1Как разобрать список именованных экспортов ES6 / ES2015 из модуля?
  • 1Как сделать Gradle быстрее
  • 1Данные консоли API повреждены. Невозможно восстановить идентификатор клиента для определенного пакета и производственного ключа.
  • 1Получить следующий элемент Jsoup с таким же именем Android
  • 0Установка MySQL конфликтует с MySQL-сервером
  • 0Не могу разобрать 0:30 AM / PM правильно в PHP
  • 0анимация не плавная с .animate и .scrollTop
  • 1У меня есть атрибут knowntype в datacontract и я не знаю, как изменить xml, чтобы принять эти типы Knowntype
  • 0Выпадающее меню появляется за пределами контейнера
  • 1«Документ отсутствует (возможно, он был удален?)» В отношении документа, который был только что создан
  • 0Как я могу вызвать func, когда другой был завершен?
  • 0Установите дату создания и дату изменения сущности по умолчанию с помощью jhipster
  • 0PHP отображает первый символ строки, когда один результат, но полную строку, когда несколько результатов
  • 0в SQL EXPLAIN, возможные ключи и ключ, выбрать один из PK или все?
  • 0Реализация конструктора копирования для связанного списка
  • 1addTextChangedListener работает для одного EditText, но не для другого
  • 1Как я могу опубликовать как страницу Facebook, используя API теперь, когда разрешение publish_actions устарело? (с 24 апреля 2018 г.)
  • 1nullPointerException в списке из нескольких столбцов с использованием hashmap
  • 1Как проверить версию pymodbus для декодирования значения float_32?
  • 0Как получить подтверждение в Volley или Retrofit?
  • 0contenteditable для встроенного редактирования с помощью ckEditor
  • 0Закрытие клиентского сокета, после того как сервер уже закрыл свою сторону
  • 0Модульный тест не выдает ожидаемой ошибки при проверке в реальном времени.
  • 0ключевое слово на элементах встроенного блока
  • 0Ошибки malloc при передаче ссылок cv: Mat
  • 1Использование конкретных номеров для достижения целевого числа
  • 0создание столбцов и строк; запрашивая количество строк, которые пользователь хочет вывести на дисплей,

Первым делом:

Скачайте библиотеку — скачать microsoft.office.interop.word.dll

Затем:

Поместите microsoft.office.interop.word.dll
в одну из следующих папок:

Если у вас 64-битная версия Windows, то поместите файл в:

«C:WindowsSysWOW64»

Если у вас 32-битная версия Windows, то поместите файл в:

«C:WindowsSystem32»

После этого

Перезагрузите компьютер, чтобы изменения вступили в силу.

Всё равно выдаёт ошибку microsoft.office.interop.word.dll
не был найден?

Тогда придётся установить этот файл вручную. Для этого:

Зайдите в меню «Пуск».

В строчке поиска введите «cmd». И запустите найденную программу от имени администратора.

В открывшемся окне введите «regsvr32 microsoft.office.interop.word.dll
«.

После этого снова перезагрузите компьютер. Теперь ошибка должна быть исправлена.

Если что-то не понятно прочитайте более подробную инструкцию — как установить dll файл.

Понравилась статья? Поделить с друзьями:
  • Нет kbcnjd в excel
  • Нет inquire в excel
  • Нет immediate в excel
  • Нет excel на компьютер бесплатно
  • Нет excel во вкладке создать