VB.net Excel Add-In Type Outlook.Application not defined

Hi

In the following code I am getting the error: Type Outlook.Application not defined
I have added references to Microsoft.Office.Interop.Outlook and the Microsoft Office 12 Object Library

Imports Microsoft.Office.Interop.Outlook

Module modEmail

    Public oOutApp As Outlook.Application = New Outlook.Application()
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
 
Rory ArchibaldConnect With a Mentor Commented:
Perhaps change the Imports statement to

Imports Outlook = Microsoft.Office.Interop.Outlook
0
 
CodeCruiserConnect With a Mentor Commented:
Or change

Public oOutApp As Outlook.Application = New Outlook.Application()

to

Public oOutApp As Application = New Application()
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
thanks for the help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.