L
Linn Kubler
Now I'm trying to access the contents of user defined variables and I'm
getting error messages. In this case I have a variable I defined on a
public folder calendar called Team. The following code works down to the
PatientRecord.UserProperties.Find command at which point I get the error:
Type missmatch.
Dim orgDeliveriesFolder As Outlook.Folders
Dim PatientRecord As Outlook.AppointmentItem
Dim PatientList As Outlook.Items
Dim objProperty As Outlook.UserProperties
Set PatientList = orgDeliveriesFolder.Items()
Set PatientRecord = PatientList.GetFirst
MsgBox ("Deliveries Folder Name = " & orgDeliveriesFolder.Name _
& Chr(13) & "No. of Patients = " &
orgDeliveriesFolder.Items().Count)
For i = 1 To 5
MsgBox ("Patient Name = " & PatientRecord.Subject & Chr(13) & _
"Location = " & PatientRecord.Location & Chr(13) & _
"Start = " & PatientRecord.Start & Chr(13) & _
"Categories = " & PatientRecord.Categories & Chr(13) & _
"Message = " & PatientRecord.Body)
Set objProperty = PatientRecord.UserProperties.Find("Team")
If TypeName(objProperty) <> "Nothing" Then
MsgBox "Got it!"
End If
Set PatientRecord = PatientList.GetNext
Next i
So the line, "Set objProperty = PatientRecord.UserProperties.Find("Team")"
throws the error. I don't get it, it's almost identical to the example in
the online help. And, it works on another, unrelated public calendar. With
the exception that the UDF doesn't exist on that calendar.
Once again, any help is greatly appreciated,
Linn
getting error messages. In this case I have a variable I defined on a
public folder calendar called Team. The following code works down to the
PatientRecord.UserProperties.Find command at which point I get the error:
Type missmatch.
Dim orgDeliveriesFolder As Outlook.Folders
Dim PatientRecord As Outlook.AppointmentItem
Dim PatientList As Outlook.Items
Dim objProperty As Outlook.UserProperties
Set PatientList = orgDeliveriesFolder.Items()
Set PatientRecord = PatientList.GetFirst
MsgBox ("Deliveries Folder Name = " & orgDeliveriesFolder.Name _
& Chr(13) & "No. of Patients = " &
orgDeliveriesFolder.Items().Count)
For i = 1 To 5
MsgBox ("Patient Name = " & PatientRecord.Subject & Chr(13) & _
"Location = " & PatientRecord.Location & Chr(13) & _
"Start = " & PatientRecord.Start & Chr(13) & _
"Categories = " & PatientRecord.Categories & Chr(13) & _
"Message = " & PatientRecord.Body)
Set objProperty = PatientRecord.UserProperties.Find("Team")
If TypeName(objProperty) <> "Nothing" Then
MsgBox "Got it!"
End If
Set PatientRecord = PatientList.GetNext
Next i
So the line, "Set objProperty = PatientRecord.UserProperties.Find("Team")"
throws the error. I don't get it, it's almost identical to the example in
the online help. And, it works on another, unrelated public calendar. With
the exception that the UDF doesn't exist on that calendar.
Once again, any help is greatly appreciated,
Linn