Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: Add Custom Fields using CDO.Appointment Object


Message #1 by "Jean Paul Mir" <jeanpaul.mir@d...> on Fri, 17 Jan 2003 10:15:57 -0400
Hi,
 
I need to create custom fields with each appointment item for special
purposes. I already created an Outlook 2002 Custom Form for intranet
use, but for Internet users we have an ASP application to do that. When
Outlook create an appointment using this Custom form, those fields are
created correctly but... How can I do that in ASP? Here's the code I've
written...
 
Comments : I've been trying with Fields Collection's Add method but that
fires an error like...
 
"This object does not support that property or method 'CDOA.Fields.Add'"
 
Function Insert1(Valores)
SET CDOA = Server.CreateObject("CDO.Appointment") 
if Err.number <> 0 then 
ERROR(5) 
else 
Consulta1 = split(Valores,";") 
 
CDOA.Subject = Consulta1(2) 
CDOA.StartTime = CDate(Consulta1(3)) 
CDOA.EndTime = CDate(Consulta1(4)) 
CDOA.TextBody = Consulta1(6) 
CDOA.MeetingStatus = Consulta1(7) 
CDOA.Location = Consulta1(9) 
CDOA.Priority = Consulta1(10) 
CDOA.Fields.Add "clienteid", Consulta1(15) 
CDOA.Fields.Add "accionid" , Consulta1(16) 
CDOA.Fields.Add "resultado", Consulta1(17) 
CDOA.Fields.Add "donde" , Consulta1(18) 
CDOA.Fields.Add "metodoid" , Consulta1(19) 
'Let the server to set the name
CDOA.DataSource.SaveToContainer strDSN 
Insert1 = CDOA.DataSource.SourceURL 
end if 
SET CDOA = NOTHING 
End Function
 
I've tried with that too...
 
...
CDOA.Fields("clienteid").Value = Consulta1(15)
CDOA.Fields("accionid").Value = Consulta1(16)... and so on!
 
When I do that, there's no error but the Item created doesn't have any
custom fields inside :-(
 
Thanks in advance!!!
 

Message #2 by jeanpaul.mir@d... on Mon, 20 Jan 2003 14:21:14
Hey,
Forget it, MAPI is the right way!!!
I've tested and It's working fine!
JPM

  Return to Index