• RSS
  • Twitter
  • FaceBook

Exchange Server Forums

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

Appointment message class in public folder

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [Microsoft Exchange 2003] >> Public Folders >> Appointment message class in public folder Page: [1]
Login
Message << Older Topic   Newer Topic >>
Appointment message class in public folder - 16.Jun.2004 12:27:00 PM   
Nick_Whymark

 

Posts: 2
Joined: 16.Jun.2004
From: UK
Status: offline
I am trying to strip out all of the attachments added to instances of a custom form published to a Public Folder. This is done via a timed Event Sink.

I open an ado recordset and run a query to find all those items that have attachments using the "urn:schemas:httpmail:hasattachment" property. I then iterate through the recordset, saving any attachments to a fileshare and then deleting all of the attachments in the item. After this is complete, I save the item.

The code runs successfully for custom forms based on a IPM.Contact, but when the code is executed for a form of base type IPM.Appointment the message class changes from the custom type to the base type. The code that is executing is shown below.

Does anyone know how I can stop the Custom message class reverting to the standard message class on Appointment items !

code:
  
Dim cdoMsg As CDO.Message
Dim objAttachment As CDO.IBodyPart


While Not adoSet.EOF
sMsgClass = adoSet.Fields("http://schemas.microsoft.com/exchange/outlookmessageclass").Value

Set cdoMsg = CreateObject("CDO.Message")
cdoMsg.DataSource.Open adoSet.Fields("DAV:href").Value, , 3

For Each objAttachment In cdoMsg.Attachments
'Save it to a file share
sLinkLocation = "c:\" & objAttachment.FileName
objAttachment.SaveToFile sLinkLocation
Next

cdoMsg.Attachments.DeleteAll
cdoMsg.DataSource.Save
adoSet.MoveNext
Wend

Post #: 1

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [Microsoft Exchange 2003] >> Public Folders >> Appointment message class in public folder Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Follow TechGenix on Twitter