I have an double array which I would like to get the value of one of it's members and assign it to the To field of an outlook form. However, I receive a type mismatch: Employees Error.
HTML Code:Function Item_Open() Dim FormPage, Control Set FormPage = Item.GetInspector.ModifiedFormPages("Message") Set Control = FormPage.Controls("TypeCombo") Control.PossibleValues = "Sign In;Lunch Out;Lunch In;Sign Out" Dim Employees(30,5) Employees(0,0) = "John" Employees(0,1) = "[email protected]" End Function Sub Item_CustomPropertyChange(ByVal Name) Dim FormPage, Control Set FormPage = Item.GetInspector.ModifiedFormPages("Message") Set Control = FormPage.Controls("TypeCombo") Select Case Name Case "TypeCombo" SupervisorEmail = Employees(0,1).value If Control.ListIndex = 0 Then Item.Subject = "Sign In" Item.To = SupervisorEmail End If If Control.ListIndex = 1 Then Item.Subject = "Lunch Out" Item.To = SupervisorEmail End If If Control.ListIndex = 2 Then Item.Subject = "Lunch In" End If If Control.ListIndex = 3 Then Item.Subject = "Sign Out" End If End Select End Sub




Reply With Quote