J
Jeff
I'm getting the error "Object could not be found" (-2147221233) when adding to
a folder I created. I suspect it's caused by a missing form, but can't tell.
If not a missing form, then what?!! I've read everything I can find on forms
cache, publishing forms, folder solutions.
Additional facts:
- Folder is currently empty
- Folder is non-public (in a private mailbox)
- Using Exchange 2000 Enterprise SP3
- Folder is a task folder with additional fields (text, yes/no, datetime)
- Am attempting to add "IPM.Task.MyType" item
- This folder has NO forms associated with it
- We DO have an organization forms collection (I believe should be unrelated)
- By default, I use an HTML page with custom controls to display folder items
- Can successfully add vanilla IPM.Task items to folder using standard task
form
- Can successfully add "IPM.Task.MyType" items in C++ going through MAPI
- Have deleted and re-created folder...no effect
- Some users have no error; others do. (Users are on different Exchange
servers)
- Folder is not top-level: have folder structure like:
+ Mailbox
- MyFolders
- ProblemFolder
Here's the code (I've omitted successful setup code, functions, and error
checks)
Dim objFolder As MAPIFolder
Dim otlTasks As Items
Dim otlItems As Object
Dim otlItem As Object
Set objFolder = m_otlNamespace.GetFolderFromID(strMyFolderID)
Set otlTasks = objFolder.Items
Set otlTasks = otlTasks.Restrict("[CustomTextField]=sometext")
Set otlItems = otlTasks ' Keep reference for future use
Set otlTasks = Nothing
Set objFolder = Nothing
If otlItems.Count = 0 Then
'THIS IS THE LINE THAT THROWS THE ERROR
Set otlItem = otlItems.Add("IPM.Task.MyType")
....
Thanks in advance for any help or suggestions of things I can investigate!
a folder I created. I suspect it's caused by a missing form, but can't tell.
If not a missing form, then what?!! I've read everything I can find on forms
cache, publishing forms, folder solutions.
Additional facts:
- Folder is currently empty
- Folder is non-public (in a private mailbox)
- Using Exchange 2000 Enterprise SP3
- Folder is a task folder with additional fields (text, yes/no, datetime)
- Am attempting to add "IPM.Task.MyType" item
- This folder has NO forms associated with it
- We DO have an organization forms collection (I believe should be unrelated)
- By default, I use an HTML page with custom controls to display folder items
- Can successfully add vanilla IPM.Task items to folder using standard task
form
- Can successfully add "IPM.Task.MyType" items in C++ going through MAPI
- Have deleted and re-created folder...no effect
- Some users have no error; others do. (Users are on different Exchange
servers)
- Folder is not top-level: have folder structure like:
+ Mailbox
- MyFolders
- ProblemFolder
Here's the code (I've omitted successful setup code, functions, and error
checks)
Dim objFolder As MAPIFolder
Dim otlTasks As Items
Dim otlItems As Object
Dim otlItem As Object
Set objFolder = m_otlNamespace.GetFolderFromID(strMyFolderID)
Set otlTasks = objFolder.Items
Set otlTasks = otlTasks.Restrict("[CustomTextField]=sometext")
Set otlItems = otlTasks ' Keep reference for future use
Set otlTasks = Nothing
Set objFolder = Nothing
If otlItems.Count = 0 Then
'THIS IS THE LINE THAT THROWS THE ERROR
Set otlItem = otlItems.Add("IPM.Task.MyType")
....
Thanks in advance for any help or suggestions of things I can investigate!