I'm having a problem with my VB program that once worked ok but now doesent. Not a new story I'm sure. My program uses outlook to send an e-mail, and has been working up until our company CIS department made some upgrades to Outlook. Now I get the following error at the (olMailItem):
Compile error:
Can't find project or library.
with my code looking like this:
Dim sa As String, sb As String, sc As String
Dim olApp As New Outlook.Application
Dim NewMail As Outlook.MailItem
Dim sMailAddress As String
sMailAddress = GetEmailAddress 'use the function GetEmailAddress to take the supervisors name and convert to an address
Set NewMail = olApp.CreateItem(olMailItem)
NewMail.ClearConversationIndex
NewMail.Recipients.Add sMailAddress
......
I have two references checked in my project for Outlook, which are:
Microsoft Outlook View Control
Microsoft Outlook 10.0 Object library
It seems to me that regardless of what upgrades are done to Outlook, the above code should work. Any Ideas what I can do ???