I´m a newbie.. I want to connect the adressbok in outlook.. - InfoPath Dev
in

InfoPath Dev

I´m a newbie.. I want to connect the adressbok in outlook..

Last post 02-05-2010 03:12 AM by agaigseth. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 01-29-2008 12:23 AM

    • poolar
    • Not Ranked
    • Joined on 01-29-2008
    • Posts 3

    I´m a newbie.. I want to connect the adressbok in outlook..

    Hi,

    I want to connect the adressbok from Outlook to my Infopath form, to a button. How can I do that??

    Can anyone help me? please.

  • 01-29-2008 07:40 AM In reply to

    Re: I´m a newbie.. I want to connect the adressbok in outlook..

    This is a fairly common request but is outside the standard features of InfoPath.

    It requires code to connect to the addressbook and then the form has to be full trust, meaning it has to be manually installed for every user so that it has the security to connect.

    A better practice is to access Active Directory, this can be done codeless with a webservice, and will give you more information such as manager, or address, etc as long as that is in your Active Directory.

  • 01-30-2008 01:16 AM In reply to

    Re: I´m a newbie.. I want to connect the adressbok in outlook..

    InfoPath 2007 includes the Contact Selector control. Here's a link to more info: http://blogs.msdn.com/infopath/archive/2006/06/19/open-your-rolodex-from-infopath-using-the-contact-selector.aspx

    Patrick Halstead
    Project Manager at Qdabra
  • 01-30-2008 06:44 AM In reply to

    Re: I´m a newbie.. I want to connect the adressbok in outlook..

    Hi, try

    http://blogs.msdn.com/timpash/archive/2005/10/31/Invoke-GAL-From-InfoPath.aspx

     Here's the code I used:

     

    function addEmailFromGAL(Item)
    
    {
         g_oMapiSession = new ActiveXObject("MAPI.Session");

    var oRecipients = null;
    g_oMapiSession.Logon("Default Outlook Profile","",true);
    try {
    var oTestMessage=g_oMapiSession.Outbox.Messages.Add();
    oRecipients=g_oMapiSession.AddressBook(oTestMessage.Recipients, "MY Adress Book", true, true, 1, "Choose");
    var localEmail = "";
    try {
    localEmail = oRecipients.item(1).AddressEntry.Fields(0x39FE001E);
    }
    catch(error) {
    localEmail = oRecipients.item(1).AddressEntry.Address;
    }
    //XDocument.UI.Alert(localEmail);
    Item.selectSingleNode("my:personResponsible").text = localEmail;
    }
    catch(overallerror) {
    XDocument.UI.Alert("You canceled !");
    }
    g_oMapiSession.Logoff();
    }

    http://www.cdolive.com/cdo10.htm
    Cheers 
  • 06-23-2008 02:00 PM In reply to

    Re: I´m a newbie.. I want to connect the adressbok in outlook..

     Where do i insert this code to?

  • 06-26-2008 10:06 AM In reply to

    Re: I´m a newbie.. I want to connect the adressbok in outlook..

    thank you guys so much for the help. I got it to work!
  • 02-05-2010 03:12 AM In reply to

    Re: I´m a newbie.. I want to connect the adressbok in outlook..

    I tried to apply this code.

    However, I received the "[Collaboration Data Objects - [E_ACCESSDENIED(8007005)]]" error and I also see the same error on the link above. Unfortunately, I cannot see the solution under it.

    Could you kindly help to resolve this error?

    Thank you so much in advance,

    Seth

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.