Folder change Event

A

Amol kulkarni

Hello,
I am developing COM Add-in for MS outlook using Com/Atl. I need to
change the folder to suppose calender. So I use SelectFolder method of
Explorer object. and pass the MAPIFolder as argument. It works fine with
Outlook 2003. But when same thing I wrte for Outlook 2000, the SelectFolder
method of Exploer gives an error at compilation.
Error states that "SelectFolder' : is not a member of
'_NoAddRefReleaseOnCComPtr<struct Outlook::_Explorer>"
Does anybody know why this error occurs and how to resolve it?

Thank You
Amol Kulkarni
 
K

Ken Slovak - [MVP - Outlook]

Because that method is not in the Outlook 2000 object model? If you want
your code to run on all versions of Outlook you should compile using the
oldest TLB you want to support and only use methods, properties or events
that are in that oldest object model. In VB you would test for Outlook
version and late bind (as Object) anything that wasn't in the older object
models and only use those things if your version test showed they were
supported.

You might want to use Explorer.CurrentFolder, which will work in Outlook
2000.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top