• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 633
  • Last Modified:

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()
0
Murray Brown
Asked:
Murray Brown
2 Solutions
 
Rory ArchibaldCommented:
Perhaps change the Imports statement to

Imports Outlook = Microsoft.Office.Interop.Outlook
0
 
CodeCruiserCommented:
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now