Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: message type


Message #1 by radim.boruvka@c... on Thu, 26 Oct 2000 09:49:15 +0100
hi everybody!

i have a problem. in my ASP app i want to find out what kind of message i

work with.



CODE:

set objMessage = objCurSession.GetMessage(strMsgID,"")

'now i want to find out what type of msg it is

Response.Write objMessage.Type

'this returns e.g. IPM.Appointment, IPM.Task, IPM.Contact etc.

'  B U T  if i do this

Response.Write "objMessage.class: " & objMessage.Class

'it returns "3" -> CdoMsg, and so although objMessage is "IPM.Appointment"

i cannot access properties specific for "AppointmentItem" e.g. "StartTime"

or "EndTime" etc., because its "Message"



Do you have any ideas?

Thanks Radim

radim.boruvka@c...



P.S. I use Win2k server & exchange

Message #2 by "Siegfried Weber" <sweber@c...> on Fri, 27 Oct 2000 22:54:16 +0200
This is a multi-part message in MIME format.



------_=_NextPart_001_01C04058.11889267

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



This is by design because CDO 1.x only returns messages if you use

GetMessage. To get an AppointmentItem you need to use CDO 1.21 and

*only* the following code:



Set objFolder =3D objSession.GetDefaultFolder(CdoDefaultFolderCalendar)

Set objAppointmentItems =3D objFolder.Messages

For Each objAppointmentItem In objAppointmentItems

 ' your code here ...

Next



</Siegfried>





> -----Original Message-----

> From: radim.boruvka@c... [mailto:radim.boruvka@c...]

> Sent: Thursday, October 26, 2000 10:49 AM

> To: ASP CDO

> Subject: [asp_cdo] message type

>

>

> hi everybody!

> i have a problem. in my ASP app i want to find out what kind

> of message i

> work with.

>

> CODE:

> set objMessage =3D objCurSession.GetMessage(strMsgID,"")

> 'now i want to find out what type of msg it is

> Response.Write objMessage.Type

> 'this returns e.g. IPM.Appointment, IPM.Task, IPM.Contact etc.

> '  B U T  if i do this

> Response.Write "objMessage.class: " & objMessage.Class

> 'it returns "3" -> CdoMsg, and so although objMessage is

> "IPM.Appointment"

> i cannot access properties specific for "AppointmentItem"

> e.g. "StartTime"

> or "EndTime" etc., because its "Message"

>

> Do you have any ideas?

> Thanks Radim

> radim.boruvka@c...

>

> P.S. I use Win2k server & exchange

>

> ---

> Wrox Professional Web Developer Conference II

> http://www.wroxconferences.com/WebDevEurope

> November 29th - December 1st 2000, Amsterdam, Netherlands

> Create powerful distributed web applications serving you now and

> in the future. From ASP+ and VB.NET to XML and SQL Server 2000




>

>





  Return to Index