Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to get Outlook contacts in Visual C++

Posted on 2003-12-03
9
Medium Priority
?
865 Views
Last Modified: 2009-07-29
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.

sincerely,
LVT
0
Comment
Question by:lvt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 23

Expert Comment

by:slink9
ID: 9869816
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.
0
 
LVL 23

Expert Comment

by:slink9
ID: 9869827
What version of OL?  You will need the object model for that version.
OL2000 - http://www.microeye.com/resources/ObjectModel.htm
0
 

Author Comment

by:lvt
ID: 9882721
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+
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 23

Accepted Solution

by:
slink9 earned 375 total points
ID: 9882818
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 - http://www.express-soft.com/mailmate/clickyes.html
0
 

Author Comment

by:lvt
ID: 9886077
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?  

thanks,
address@hotmail.com
0
 
LVL 23

Expert Comment

by:slink9
ID: 9886110
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"
    loOutlook=createobject("outlook.application")
    loOutMail=loOutlook.createitem(olMailItem)
    with loOutMail
         .to = "address@hotmail.com"
         .subject = subj
         .body = bod
         .send
    endwith

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.
0
 

Author Comment

by:lvt
ID: 9894701
thank you very much.

LVT
0
 
LVL 12

Expert Comment

by:deanvanrooyen
ID: 10150935
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.
0
 
LVL 12

Expert Comment

by:deanvanrooyen
ID: 10150958
check it out,

this is early binding though, an easy way to do it but programticaly not the best

http://www.codeproject.com/com/outlookcontacts.asp
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
This article describes how to import Lotus Notes Contacts into Outlook 2016, 2013, 2010 and 2007 etc. with a few manual steps. You can easily export and migrate Lotus Notes contacts into Microsoft Outlook without having to use any third party tools.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question