none
My Program can't find Interop.Outlook on 2013 Outlook as did for prior versions. RRS feed

  • Question

  • I have a visual Studio 2005 (vb) application that creates a MSOutlook email with attached PDF report file.

    It references Microsoft Outlook 11 Libarry:  C:\Windows\assembly\GAC\Microsoft.Office.Interop.Outlook\11.0.0._71e9bce111e9429c\Microsoft.Office.Interop.Outlook.dll

    We have various customers with various versions of MSOutlook, and it has always just worked.

    Now, we have one we installed MSOutlook 2013 standalone and it is giving error that it can't find the Interop.Outlook.dll  and lists the version 11.0.0 .... in the error message.

    The system is WIndows 7 64 bit PC with MSWord 2013 & MSExcel 2013 are installed standalone.

    I can see the interop files in C:\windows\assembly for MSWord & MSExcel, but not MSOutlook.

    I have already tried:

    Uninstall/reinstall  MSOutlook 2013 to ensure that the 32 bit default installation path was taken, not the 64 bit path.

    Tried to find MSOutlook 2013 interop and download and install it,  all links went to MSOutlook 2010 interop,

    so tried that install.  Did NOT see MSOutlook in C:\Windows\assembly folder.

    Added into my vb.net project file:  (via notepad)  in PropertyGroup section:<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> 

    Checked Registry to see if ClickToRun was turned on, found:HKEY_LOCAL_MACHINE\Software\Microsoft\Office\15.0\Common\FilesPaths  

    (No InstallRood\Virtual\Virtual Outlook   ... or anything that looked like it was.

    Questions:

    Is there an actual Outlook 2013 interop install that I'm just not finding?

    Why is the default to automatically redirect to current version not working?

    How do I really tell / or get / a version installed?  (I'm not seeing it in C:\Windows\assembly)

    Is there a compatibility or approach change in MSOutlook 2013 that is causing this?

    Can I install an older version, prior to MSOutlook 2013, from where, that will work ?

    Please advise, Thank you.


    Lori Janes


    • Edited by LJ1111 Thursday, July 17, 2014 3:49 PM
    Thursday, July 17, 2014 3:46 PM

Answers

  • Hello Lori,

    > Is there an actual Outlook 2013 interop install that I'm just not finding?

    Typically interop libraries installed with the host application if you chose the .Net programmability support in the installation wizard.

    > How do I really tell / or get / a version installed?  (I'm not seeing it in C:\Windows\assembly)

    You should include the required interop file to the installer of your add-in/application.

    You can download and install only Microsoft Office 2010: Primary Interop Assemblies Redistributable . There is no such files for Office 2013.

    Be aware, the interop file can be generated programmatically on your own (as Visual Studio does when you add a reference to Outlook).

    > Can I install an older version, prior to MSOutlook 2013, from where, that will work ?

    Yes, you can. But you should use only those features (methods and properties) available in the old version of Outlook.

    Finally, you can read more about interop files in the Office Primary Interop Assemblies section in MSDN.

    Thursday, July 17, 2014 4:02 PM
  • You would put the 2003 PIA in the installation folder, not the GAC. I keep saying that. You have it as a reference in your project, just deploy it to the installation folder.

    You should not for practical, licensing and legal reasons try to use the PIA from QuickBooks.


    Ken Slovak MVP - Outlook

    Wednesday, July 23, 2014 4:41 PM
    Moderator

All replies

  • Hello Lori,

    > Is there an actual Outlook 2013 interop install that I'm just not finding?

    Typically interop libraries installed with the host application if you chose the .Net programmability support in the installation wizard.

    > How do I really tell / or get / a version installed?  (I'm not seeing it in C:\Windows\assembly)

    You should include the required interop file to the installer of your add-in/application.

    You can download and install only Microsoft Office 2010: Primary Interop Assemblies Redistributable . There is no such files for Office 2013.

    Be aware, the interop file can be generated programmatically on your own (as Visual Studio does when you add a reference to Outlook).

    > Can I install an older version, prior to MSOutlook 2013, from where, that will work ?

    Yes, you can. But you should use only those features (methods and properties) available in the old version of Outlook.

    Finally, you can read more about interop files in the Office Primary Interop Assemblies section in MSDN.

    Thursday, July 17, 2014 4:02 PM
  • Okay, thank you for your assistance.

    So, I already tried downloading the 2010 PIA, the exact link that you sent.   It just blinked a box and ended.   I did NOT then see MSOutlook in the C:\windows\assembly folder with the ExCel & Word still.   I DID see MSOffice 2010 Interoparability (Or similar/something) in the Control Panel, Install/Uninstall software list.

    And my Program, send to MSOutlook, still did not work.

    But, sounds like it was supposed to, that's really encouraging !

    Should it's install show me pages of copying files and/or an ending message that says that it installed correctly vs. just the quick blip and no concluding message?

    Why might it not have worked on my install ?

    Is there a better place to see it installed vs. just C:\windows\assembly folder ?

    Yes, after I get this working for this customer, I'll add it to my installer.  THx for that note also.


    Lori Janes

    Thursday, July 17, 2014 10:17 PM
  • Outlook should be installed on the machine. Interop assemblies just marshal the calls from managed code to the unmanaged one.
    Friday, July 18, 2014 6:16 AM
  • We installed, then uninstalled and reinstalled MSOutlook.

    But, this did not work.

    That's when I tried all of the things listed above, including, downloading the 2010 Interop installs.

    So, still not work.    Customer calling daily to see if I have this fixed.

    Why would it NOT install ?   Why not the 2010 download not install ?

    Can I just Put a file in a certain folder and set a registry setting to force it?



    Lori Janes

    Monday, July 21, 2014 7:08 PM
  • Did you include interop libraries in the installer? Do you get any errors or exceptions?
    Monday, July 21, 2014 7:46 PM
  • Installer includes:  Folder 'Detected Dependencies' ... Microsoft.Office.Interop.Outlook.dll

    Running the 2010 Office Interop, just flashed a fast message, non-readable.  Then, did NOT see Outlook listed in C:\windows\assemblies, still only Excel & Word interops.


    Lori Janes

    Tuesday, July 22, 2014 1:48 PM
  • Why do you expect to see any interop library in the C:\windows\assemblies folder?

    Instead, you need to include the referenced assemblies in the installer of your application or use the Embed Interop Types option available since .Net 4.0.

    Tuesday, July 22, 2014 2:23 PM
  • My original request said I was using VS2005, and it references Outlook:

    I have a visual Studio 2005 (vb) application that creates a MSOutlook email with attached PDF report file.

    It references Microsoft Outlook 11 Libarry:  C:\Windows\assembly\GAC\Microsoft.Office.Interop.Outlook\11.0.0._71e9bce111e9429c\Microsoft.Office.Interop.Outlook.dll

    My original request asked:

    How do I really tell / or get / a version installed?  (I'm not seeing it in C:\Windows\assembly)

    I'm looking in C:\windows\assembly, because I don't know where to look.

    Please answer my questions:

    1) How do I really tell if a version of Interop MSOutlook installed?   Where do I look to see if it is installed properly?

    2) How do I register it myself manually if the Interop installer is erroring?

    3) Why would my vs.net (vs2005) reference to Interop.Outlook (listed above), and my Installer includes:  Folder 'Detected Dependencies' ... Microsoft.Office.Interop.Outlook.dll   Not find his MSOutlook 2013?  

    a) MSOutlook 2013 Interop did NOT install properly as it should have when MSOutlook installed.

    b) Office 2010 Interop, ... just flashes, so I have no confidence that it installed properly.

    c)  For some reason, my program's reference to it, (in technical detail) is looking for prior version, but is not finding version 2010/2013.  But, I have tried add the : <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>   to force it to look for newer versions.

    I Mostly need to know Question 1) and 2) above, please.



    Lori Janes

    Tuesday, July 22, 2014 9:04 PM
  • There is an Outlook 2013 PIA, but not a redistributable package. If it's installed it should be in the GAC, at least it is on a Win7x64 Office 2013x64 VM here. That would be where you're checking, in C:\Windows\Assembly. It would be listed as Microsoft Outlook.

    See http://msdn.microsoft.com/en-us/library/office/bb646840(v=office.15).aspx for information on installing it if it's not there.

    Do you have Framework 2.0 installed on that machine?

    A better solution would be to use a version of VSTO where you can embed the PIA using Framework 4 or higher, but that would require porting to a later version of VS and VSTO.

    As you are using a reference to Outlook 2003, a last ditch hack solution would be to place the 2003 redistributable PIA in the installation folder and seeing if the code runs then.


    Ken Slovak MVP - Outlook

    Tuesday, July 22, 2014 9:22 PM
    Moderator
  • Ken, THANK YOU, ... for your help !

    When I tried to install the MSOffice 2010 interop, from the download, ... it just flashed a fast window.  Do you think that means that it errored off?  Was it supposed to open an installer window or give a nice 'install completed successfully'?   I'm wondering if it errored cuz standalone MSWord2013 & standalone MSExcel2013 were already installed, including their interops in c:\windows\assembly?  

    I'll try just putting my version 2003 Outlook interop file in C:\Windows\Assembly.   Does it not have to be 'registered' somewhere (other than just copied to the folder)?

    It will take me a day to get to my customer with this issue to try the last-ditch hack.

    My only next option, is to install my old MSOutlook2003.

    thx so much !


    Lori Janes

    Tuesday, July 22, 2014 10:08 PM
  • There is no need to register interop files anywhere. All that you need is to have the host application installed on the machine (Outlook in your case) and include the referenced interop files to the installer of your software (or use the Embed Interops option). Did you include interop files to the installer of your application? Is Outlook installed on the target machine? Interop files are not a replacement.
    Tuesday, July 22, 2014 10:37 PM
  • If Outlook 2013 is installed you shouldn't and can't install the 2010 PIA.

    You can use the information in the link I provided to install the 2013 PIA, or you can deploy the 2003 redistributable PIA to your installation folder. Fusion (the managed code loader) will look in the installation folder as well as the GAC for the referenced PIA.

    VSTO is so old and uses such an old Framework version that if possible I'd really recommend refactoring your code to a more recent version where you can embed the PIA. You need Framework 4 or higher, but you never have to worry about PIA deployment or installation again if you do that.

    You shouldn't try to install Outlook 2003 on that machine. It won't work correctly with WordMail, it's out of support and old and not updated any more. You also can't just 'place' files in the GAC. Just place the 2003 PIA in the installation folder, no registration needed.

    Also, you mentioned standalone Excel and Word 2013. Are they really standalone from each other and Outlook, or did they all come from the same Office product? Different versions or packages of Word and Outlook will severely limit the use of WordMail and will break a lot of Outlook coding for WordMail, many things won't work from the Word object model.


    Ken Slovak MVP - Outlook

    Wednesday, July 23, 2014 1:49 PM
    Moderator
  • THANK you KEN for your reply !

    First, I've looked and looked for a 2013 Outlook PIA download, and just can't find one.  Even the link you gave earlier, talks about there being one, but no link to one.  I've also searched the download center and cannot find a link to download 2013 Outlook PIA.  Am I just missing it?  I'm sorry, but, can you give me a direct link to download it?  

    The PC is 1 yr old Win .net 4.5, Win7sp1, 64bit.  We bought and installed "Microsoft Office Home and Student 2013" and I saw the Word2013 and Excel2013 icons on his desktop.    He will barely use these, you mentioned WordMail, are you saying Word2013 can also email?  Can that Conflict with the Standalone 2013 Outlook's installation putting the PIA in the C:\windows\assembly folder?

    Would uninstalling MSOffice H&S 2013, installing MSOutlook 2013, then reinstalling MSOffice H&S, let MSOutlook 2013 install its own PIA?

    Yes, I know I have GOT to update to newer Visual Studio, ... just swamped with customer requests, ... so put it off and off ... because I'm so swamped.  

    Thank you ! ! ! !


    Lori Janes

    Wednesday, July 23, 2014 3:27 PM
  • Also Ken,

    Putting my version of Interop.Outlook.dll into his c:\Windows\assembly, .... folder.

    I went to my c:\windows\assembly to get my Interop.Outlook.dll file, but, can't right-click and copy the files/listing there.  It's a list, but not the actual .dll file ?   I searched my harddrive for it, the MSOffice folder also, but only found an Interop.Outlook.dll in my Quickbooks 2011 folder.   Humn.

    So c:\windows\assembly is the LIST but not the grabable files ?   

    MSOFFice must have it in a packaged up file for the installing ?

    Just use the one I found in Quickbooks 2011, and copy it to HIS c:\WIndows\assembly folder ?

    Nothing is every as easy !  Ugh.

    THANK you SO much for your help !  This is out of my knowledge base and I'm stuck !


    Lori Janes

    Wednesday, July 23, 2014 3:52 PM
  • This is a special folder GAC (Global Assembly Cache). You can't just copy assemblies there. You need to use the gacutil.exe utility for installing or uninstalling managed assemblies.
    Wednesday, July 23, 2014 4:11 PM
  • I mentioned originally that there is no redistributable PIA package for Office 2013. You install the PIA's from the Office installation media. There are no downloads for that.

    Outlook uses Word as its email editor. It actually includes a minimal version of a Word dll to use for editing emails and other items. When you purchase an Office version that includes Outlook then the editor has additional functionality and programmability that it doesn't have when Word isn't installed or came from a different Office package than Outlook.

    In theory you should be able to install the Outlook PIA from the Outlook installation. If Outlook isn't included in the Office H&S package that package obviously couldn't install the Outlook PIA. However, Office and Outlook from separate packages can be problematical.

    The GAC is a virtual folder, it doesn't actually exist as shown in Windows Explorer.


    Ken Slovak MVP - Outlook

    Wednesday, July 23, 2014 4:38 PM
    Moderator
  • You would put the 2003 PIA in the installation folder, not the GAC. I keep saying that. You have it as a reference in your project, just deploy it to the installation folder.

    You should not for practical, licensing and legal reasons try to use the PIA from QuickBooks.


    Ken Slovak MVP - Outlook

    Wednesday, July 23, 2014 4:41 PM
    Moderator
  • Oh, thanks for clarifying, because I thought when you said to put it into the installation folder you meant the MSOutlook installation.   Now, You mean just the folder where I execute MyProgram.exe from.   

    Okay, Now I have to see how to GET a 2003 Outlook interup .dll, ... I see my install cd they are all in cab files, and searching my systems are not just saved somewhere.   The installer must just Register them only and not copy them anywhere.  

    Thx,

    Lori


    Lori Janes

    Thursday, July 24, 2014 2:31 PM
  • Normally Office comes all in one package and you can set automation options for everything (Outlook, Word, Excel, etc.) at one time in one installation. In this case Outlook is a separate installation and the option to install the PIA must be set in that installer. You really should be able to do this on that machine. That would be the best case scenario.

    The 2003 installer did install the PIA's for you in addition to registering them. The easiest way to deal with deploying the 2003 PIA would be to add it to your setup package as an interop assembly instead of using it as a PIA, even though this isn't a best practice.

    Take a look at http://msdn.microsoft.com/en-us/library/office/aa159923(v=office.11).aspx. Read it carefully, especially the par about copying local.


    Ken Slovak MVP - Outlook

    Friday, July 25, 2014 2:59 PM
    Moderator
  • Hey, wanted to say Thank You ! ! ! 

    I did get on that customer's computer, and had a list of things prepared to try from our conversations.

    The first one, copying the Outlook 2005 dll to my programs execution folder worked !

    ( I never was able to get my own out of my Install, but had downloaded one from the web.)

    So, I just wanted to say THANK YOU to you two guys for spending the time to help me ! ! !

    Thank You Thank You THank You

    Lori


    Lori Janes

    Thursday, August 7, 2014 2:09 PM
  • Hey, ... Will this work on a MacIntosh PC with a Windows partition?

    I have a customer which I just connect into the Windows partition, and I see MSOffice 2003, including Outlook 2003, already installed.   And my program's creating an outlook email gives the error message that it can't find the interop file.   I tried copying the Outlook interop dll into the folder the program ran from (which worked before) and that did not work either.   Same message.

    Is there something different because it's a Mac, really?

    THx for your help.

    LJ


    Lori Janes

    Thursday, October 30, 2014 6:14 PM