How to get Outlook contacts in Visual C++

Hello experts,

I am a newbie.  I wanna write an Add-in to get Outlook contacts in Visual C++.  Most sample codes out there are in Visual Basics.  I appreciate for any hints, comments, suggestions, or sample codes.  Thank you very much for reading.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Are you a newbie to VC++?  If so, you need to start with something much easier than this.  If you have experience programming in VC++ then you should be able to convert from VB without a problem.
It would probably be a good idea to post the VB code you have seen and want to use as a model.  Maybe someone will convert it for you.
What version of OL?  You will need the object model for that version.
OL2000 -
lvtAuthor Commented:
yes, i am a newbie to VC++.  Since I have a project related to Outlook add-in, that's why I start with something harder.  Thank you for your comments & suggestion.  I think I must start with something easier then come back to this, and probably post a VB code so that someone convert it for me.  Thank you again!

The version of OL is 2K+
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

I can give you Visual Foxpro code.  The code is quite easy.  I will have to wait until tonight when I get home.  Are you going to close the question or hold it open for later help?

Something that you may need is ClickYes -

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lvtAuthor Commented:
thank you, slink9.  I'd like to take a look your code, maybe it helps.  I am a newbie in this forum too.  I don't know how to close the question.  If I close it, can I reopen it for later help?  

Welcome aboard.

You closed it properly.  You just open another question if you have another question.  By the way, it is generally expected to give an A unless you explain why.  The B is justified here since I didn't actuallt solve the problem - just gave a little advice.

Here is the code for firing up an email in VFP.

#define olMailItem 0
#define olTaskItem 3

subj = "Test EMail"
    bod = "Test send from VFP"
    with loOutMail
         .to = ""
         .subject = subj
         .body = bod

The few things that will change in VC is the DEFINE statement.  I believe you will use something other than WITH .. ENDWITH in VC.

Good luck, and happy learning.
lvtAuthor Commented:
thank you very much.

hi lvt,

i am also new to vc++, I actualy found code to do it, and modified it to allow me to enter a telephone number and it would pop the outlook contact using the contact.display function. the vfp code above looks too similiar to vb for me. I have lost my code for the app and now looking again to find this code. If I rememver the best way was to use com, and then use the item collection of the contact object, if you could point me at any web sites with this code please let me know.
check it out,

this is early binding though, an easy way to do it but programticaly not the best
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.