View Single Post
  #3  
Old July 8th 09, 08:17 PM posted to microsoft.public.outlook.program_vba
MB34
external usenet poster
 
Posts: 15
Default Obtain property value by name

Need to access Appointment property by propertyname.
How to do that?


Let's say I want to write a function and pass a property name and then
return the value:
{Delphi}
function getPropValue(Propname: String): Variant;
begin
* Result := AppointmentItem. ?????
end;


You need to handle every supported case, e.g.:

Select Case Propname
Case "Start": getPropValue=Item.Start
Case "Subject": getPropValue=Item.Subject
End Select


You mean that there is no way without handling each property in a case
statement?
The Delphi Outlook object model does not expose the ItemProperties
either.
Ads