|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
assign task field in VB.NET results in MAPI_E_NO_SUPPORTI have a code that works with VB script but I obtain MAPI_E_NO_SUPPORT if I try to execute it with VB.net 2005 Public Const CdoTask_OutlookInternalVersion = "0x8552" Public Const CdoPropSetID4 = "0820060000000000C000000000000046" Dim oTask As MAPI.Message .... oTask.Fields.Add(CdoTask_OutlookInternalVersion, vbLong, 118118L, CdoPropSetID4) The code inserts an outlook task in a folder using MAPI. I know that working with tasks is undocumented with CDO but I do not know what could be de difference between the execution of the sentence in a script and .net Any suggestions are welcome. Thank you in advance. Jose Manuel. "Jose Manuel Tovar" <josem.to***@terra.es> wrote in The problem is that CDO1.21 isn't supported from .Net:news:ePIWiSdWHHA.192@TK2MSFTNGP04.phx.gbl: > The code inserts an outlook task in a folder using MAPI. I know that > working with tasks is undocumented with CDO but I do not know what > could be de difference between the execution of the sentence in a > script and .net http://support.microsoft.com/kb/813349 I don't think that's exactly the problem you're hitting, mind you, that's more talking about threading/memory management issues. I'd guess the problem you're seeing is that the type library import stuff isn't working in .Net, so the call to Fields.Add is getting confused somewhere in the COM wrapper layer. As long as you don't mind your code possibly randomly failing at some time in the future, I'd say the fix for your short-term problem would be to try different approaches to creating the field; don't pass in the value, for instance, and see if that works any better. Alternative 2: see if you can read that field from an existing task, get the numeric property ID, then create the field by numeric ID. As long as you don't try and reuse this number (because it can vary across servers/stores on a given serve, but should be consistent between a read and a write), you should be okay. -- dan Thank you very much Dan for your quick response.
One more question, in your opinion wich could be the best opcion for developing an applicaction .net 2005 executed as a service (no UI) that inserts/update tasks in users folder? Thank you. Show quote "Dan Mitchell" <djmitche***@yahoo.com> escribió en el mensaje news:Xns98E38C28A1436djmitchellayahoocom@207.46.248.16... > "Jose Manuel Tovar" <josem.to***@terra.es> wrote in > news:ePIWiSdWHHA.192@TK2MSFTNGP04.phx.gbl: >> The code inserts an outlook task in a folder using MAPI. I know that >> working with tasks is undocumented with CDO but I do not know what >> could be de difference between the execution of the sentence in a >> script and .net > > The problem is that CDO1.21 isn't supported from .Net: > > http://support.microsoft.com/kb/813349 > > I don't think that's exactly the problem you're hitting, mind you, > that's more talking about threading/memory management issues. I'd guess > the problem you're seeing is that the type library import stuff isn't > working in .Net, so the call to Fields.Add is getting confused somewhere > in the COM wrapper layer. > > As long as you don't mind your code possibly randomly failing at some > time in the future, I'd say the fix for your short-term problem would be > to try different approaches to creating the field; don't pass in the > value, for instance, and see if that works any better. > > Alternative 2: see if you can read that field from an existing task, > get the numeric property ID, then create the field by numeric ID. As > long as you don't try and reuse this number (because it can vary across > servers/stores on a given serve, but should be consistent between a read > and a write), you should be okay. > > -- dan I am testing webDav and I can see that create a task is not a problem but
assigning tasks to other users is not possible... I can write tasks in other user folder but in this way I loose the messages with the evolution of the tasks... I also see that tasks in CDOEX are not documented. So what option is fully complete and documented for working with tasks? Thank you one more time to anyone interested in this gorgeus world of managing tasks in exchange. Show quote "Jose Manuel Tovar" <josem.to***@terra.es> escribió en el mensaje news:epDQ1skWHHA.3652@TK2MSFTNGP04.phx.gbl... > Thank you very much Dan for your quick response. > > One more question, in your opinion wich could be the best opcion for > developing an applicaction .net 2005 executed as a service (no UI) that > inserts/update tasks in users folder? > > Thank you. > > > > "Dan Mitchell" <djmitche***@yahoo.com> escribió en el mensaje > news:Xns98E38C28A1436djmitchellayahoocom@207.46.248.16... >> "Jose Manuel Tovar" <josem.to***@terra.es> wrote in >> news:ePIWiSdWHHA.192@TK2MSFTNGP04.phx.gbl: >>> The code inserts an outlook task in a folder using MAPI. I know that >>> working with tasks is undocumented with CDO but I do not know what >>> could be de difference between the execution of the sentence in a >>> script and .net >> >> The problem is that CDO1.21 isn't supported from .Net: >> >> http://support.microsoft.com/kb/813349 >> >> I don't think that's exactly the problem you're hitting, mind you, >> that's more talking about threading/memory management issues. I'd guess >> the problem you're seeing is that the type library import stuff isn't >> working in .Net, so the call to Fields.Add is getting confused somewhere >> in the COM wrapper layer. >> >> As long as you don't mind your code possibly randomly failing at some >> time in the future, I'd say the fix for your short-term problem would be >> to try different approaches to creating the field; don't pass in the >> value, for instance, and see if that works any better. >> >> Alternative 2: see if you can read that field from an existing task, >> get the numeric property ID, then create the field by numeric ID. As >> long as you don't try and reuse this number (because it can vary across >> servers/stores on a given serve, but should be consistent between a read >> and a write), you should be okay. >> >> -- dan > > "Jose Manuel Tovar" <josem.to***@terra.es> wrote in I'm really not sure what's what in WebDAV; I don't write .Net code, so news:#vAcl$oWHHA.388@TK2MSFTNGP04.phx.gbl: > I am testing webDav and I can see that create a task is not a problem > but assigning tasks to other users is not possible... I can write > tasks in other user folder but in this way I loose the messages with > the evolution of the tasks... > > I also see that tasks in CDOEX are not documented. > > So what option is fully complete and documented for working with > tasks? I haven't had to look into it. Sending task requests is not documented -- but a while ago I reverse- engineered the process, and it's in the thread of messages here: http://peach.ease.lsoft.com/scripts/wa.exe?A2=ind0010&L=mapi-l&P=R867 Make sure you read all the way to the end, there's various corrections as you go along. I don't know how you'd do the embedded message stuff in WebDAV, though. You could use the Outlook object model, that's the only documented thing for creating task requests that I know of, but you can't use that in server code, so it's not any help to you. I think the problem you have is that there is no officially documented, MS-approved, way to do what you want to do. Some things they just don't want people to do.. That doesn't mean they're impossible, but you have to use undocumented stuff to do it. -- dan |
|||||||||||||||||||||||