There are two statements below marked 'ERROR that I would like to recode to
be acceptable to Option Strict On. I tried the two statements at the
bottom, but that was not acceptable. Can anyone Help?
Dim outlook As Outlook.Application
Dim olns As Outlook.NameSpace
Dim apptItem As Outlook.AppointmentItem
Dim mailItem As Outlook.MailItem
outlook = New Outlook.ApplicationClass
olns = outlook.GetNamespace("MAPI")
mailItem = outlook.CreateItem(olMailItem) 'ERROR
apptItem = outlook.CreateItem(olAppointmentItem) 'ERROR
Cannot use statements below because Sub New() is Private:
Dim apptItem As New Outlook.AppointmentItem
Dim mailItem As New Outlook.MailItem
Thanks,
Dean Slindee