By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
After doing, this when I run the patch below, it gives this error message:
"Couldn't complete operation because the service provided doesn't support it"
objOutlook = New Outlook.Application() objNamespace = objOutlook.GetNamespace(Type:="MAPI") objMAPIFolder = objNamespace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)
This is a hard place to try and answer questions like this. From what you've sent, your code should work with the *current* version of Outlook and the most recent object interface (which is version 10, BTW). The issue here is not a .NET issue but instead a plain-old pain in the derriere bits-n-bytes debugging issue. A couple of things to help you narrow down your debugging.
1) Exactly which activity is causing the error to be generated (which line and which operation)?
2) Does the equivalent VB6 code execute properly on your machine?
3) Do you have to stick with a six year old client?
If you can upgrade your client to 2000 or 2002, then I'd recommend that first. If you're stuck supporting the 97 client, then Narrow down exactly which operation is causing you grief. It's possible that the version of the object API does not support one of the operations or types that you specify (though you are doing pretty generic stuff!). I don't have access to an object library from two versions back so I can't help much here.
The other class of problem that you may have is that something is "out of whack". The solution is to re-whack things. Specifically, your O97 installation my be corrupted somehow. You could try reinstalling the outlook client if you still have access to the installation media. Another possibility is that one of the generated files is messed up. You can delete the assemblies generated for Outlook, remove the reference from your project and regenerate them. It's unlikely that this will matter much, however. Pay close attention to make sure that the type library that the generator is cranking on is the expected version.
Sorry that I don't have a better answer here.
Dig Deeper on Service-oriented architecture (SOA)
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.