Hello, I am developing a workflow application using Workflow Desiger Ex2K. All this workflow needs to do is to store attachments (PDF files) in a file folder whenever a message arrives in the public folder. Is there a way to get the attachments in the OnCreate event itself? Thanks - VG
You should be able to open the message using CDO and get the attachments. Tom -- Looking for a good book on Exchange, Outlook and SharePoint? Check out http://www.microsoft.com/mspress/books/5517.asp "VG" wrote in message news:925B1A46-AFF4-498C-B398-C4731A16CC38@microsoft.com... > Hello, > > I am developing a workflow application using Workflow Desiger Ex2K. All > this > workflow needs to do is to store attachments (PDF files) in a file folder > whenever a message arrives in the public folder. Is there a way to get the > attachments in the OnCreate event itself? > > Thanks > - VG
Tom, thanks for your response. I can not open the message using CDO in the OnCreate event. strSource = WorkflowSession.Fields("DAV:Href") Set objCopyMess = CreateObject("CDO.Message") objCopyMess.DataSource.Open strSource, WorkflowSession.ActiveConnection This code gives me an error in the OnCreate event. Is there any other way to do this? - VG "Tom Rizzo [MSFT]" wrote: > You should be able to open the message using CDO and get the attachments. > > Tom > > -- > Looking for a good book on Exchange, Outlook and SharePoint? Check out > http://www.microsoft.com/mspress/books/5517.asp > > > "VG" wrote in message > news:925B1A46-AFF4-498C-B398-C4731A16CC38@microsoft.com... > > Hello, > > > > I am developing a workflow application using Workflow Desiger Ex2K. All > > this > > workflow needs to do is to store attachments (PDF files) in a file folder > > whenever a message arrives in the public folder. Is there a way to get the > > attachments in the OnCreate event itself? > > > > Thanks > > - VG > > >
Don't use DAV:href since the message doesn't exist yet in the Exchange store due to transacted nature. Instead, you should be able to use the ADO EventRecord to get the item (I can't remember if the WorkflowSession gives you the ADO record as a property or not). Otherwise, you'll have to crack the MIME stream yourself to get the attachments. Doable but CDO already does this for you. Tom -- Looking for a good book on Exchange, Outlook and SharePoint? Check out http://www.microsoft.com/mspress/books/5517.asp "VG" wrote in message news:2CDE7EEF-3A41-4F41-8E68-0C9A37F6A5FC@microsoft.com... > Tom, thanks for your response. I can not open the message using CDO in the > OnCreate event. > > strSource = WorkflowSession.Fields("DAV:Href") > Set objCopyMess = CreateObject("CDO.Message") > objCopyMess.DataSource.Open strSource, WorkflowSession.ActiveConnection > > This code gives me an error in the OnCreate event. > > Is there any other way to do this? > > - VG > > "Tom Rizzo [MSFT]" wrote: > >> You should be able to open the message using CDO and get the attachments. >> >> Tom >> >> -- >> Looking for a good book on Exchange, Outlook and SharePoint? Check out >> http://www.microsoft.com/mspress/books/5517.asp >> >> >> "VG" wrote in message >> news:925B1A46-AFF4-498C-B398-C4731A16CC38@microsoft.com... >> > Hello, >> > >> > I am developing a workflow application using Workflow Desiger Ex2K. All >> > this >> > workflow needs to do is to store attachments (PDF files) in a file >> > folder >> > whenever a message arrives in the public folder. Is there a way to get >> > the >> > attachments in the OnCreate event itself? >> > >> > Thanks >> > - VG >> >> >>