Have an application that I have the task of upgrading from VB6 to VB 2008. The program has code that creates an Excel sheet and opens Outlook with the Excel sheet as an attachment.
My problem is there are 3 different versions of Outlook. I had it working from my laptop where I am developing at. I run Outlook 2013 but originally had 2010 office. Made the application a clickonce program. For people that are running 2010 and earlier outlook it was working. The Outlook 2013 throws the following exception:
Error loading type library/DLL (Exception from HRESULT:0x80029C4A (TYPE_E_CANTLOADLIBRARY). Happens during this bit of code:
Dim Olook = New Outlook.Application()
Dim Mail As Outlook.MailItem
Mail = Olook.CreateItemMicrosoft.Office.Interop.Outlook.OlItemType.olMailItem)
Reading up on this I did find that when referencing Outlook 2013, the reference is in COM tab but other versions are .net.
Does anyone know how I might get them to both play together? Excel is not having issue when I create the Excel workbook for the attachment
User contributions licensed under CC BY-SA 3.0