none
Cannot resolve recipient outlook

    Domanda

  • Hi-

    I am working on a task where i need to merge 2 calendars from seperate email accounts on Outlook. I am able to resolve 1st email but when I trying to resolve the second email, i get the message "Cannot resolve Recipient")

    I am on VPN for both the profiles (email 1 - client 1 vpn and email 2 - client 2 vpn)

    Attached is the code 

    Public Sub LoadLst(ByRef lst As Windows.Forms.ListView, ByVal Recp As String)

            lst.Items.Clear()

            Dim oNS As Outlook.NameSpace = oApp.GetNamespace("MAPI")

     

            Dim rsp As Outlook.Recipient

            rsp = oNS.CreateRecipient(Recp)

            rsp.Resolve()

            If rsp.Resolve Then

                Dim oCalander As Outlook.MAPIFolder = oApp.GetNamespace("MAPI").GetSharedDefaultFolder(rsp, Outlook.OlDefaultFolders.olFolderCalendar)

     

    Please help on what am I doing wrong and what could be the problem

     

    • Spostato Mike Feng lunedì 19 settembre 2011 10:52 Outlook (From:Visual Basic General)
    giovedì 15 settembre 2011 22:50

Risposte

  • Based on that setup it won't work unless you can use the SMTP address to create the recipient and not just an alias or name.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Vidya Sandela" <=?utf-8?B?VmlkeWEgU2FuZGVsYQ==?=> wrote in message news:8afe2724-9abc-4517-b9ae-05827d16ab2a...

    Thanks Ken for your Reply. I tried resolving by name but the problem is both are my emails which have the same last name SANDELA so the default mail is what its picking up i think because of GAL. My UI is pretty simple where i have a drop down which gets a list of emails from 

     For Each Acc As Outlook.Account In oApp.GetNamespace("MAPI").Accounts

                If Acc.SmtpAddress Is Nothing Then Continue For

                cmdListEmail.Items.Add(Acc.SmtpAddress)            

            Next

    The problem is my offshore team can get both the calendars on their machine and the issue is ONSITE ! They are pointing to the same servers as we are.

    Any help appreciated ! 


    Ken Slovak MVP - Outlook
    lunedì 19 settembre 2011 21:35
    Moderatore
  • Something must be different if it works in one place and not the other. If everything were identical it would work in both or neither. It could be the order of address book precedence, or entries in each GAL or aliases in ADUC or something else, but something is different.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Vidya Sandela" <=?utf-8?B?VmlkeWEgU2FuZGVsYQ==?=> wrote in message news:3f945cef-ce9c-402e-b19d-3a109ddfb4f5...

    Ken, thank you ! 

    If that is the case, why is the offshore team able to grab that information with the same setup ?


    Ken Slovak MVP - Outlook
    lunedì 19 settembre 2011 22:00
    Moderatore

Tutte le risposte

  • For MS Office related questions use the Microsoft Office for Developers Forums .

    you should be able to get better support


    Mark the best replies as answers. "Fooling computers since 1971."

    http://thesharpercoder.blogspot.com/

    venerdì 16 settembre 2011 00:01
  • Have you looked at the addresses being passed to the procedure to make sure they look valid?
     
    Can you take the same addresses and use them in the user interface to resolve a recipient?
     
    If this is an alias type "address" such as "kens", that would be valid only for the specific Exchange global address list that had such an entry. If you are logged into another Exchange server you might not be able to resolve a recipient in another, different GAL, depending on your setup and Outlook version.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Vidya Sandela" <=?utf-8?B?VmlkeWEgU2FuZGVsYQ==?=> wrote in message news:6bffeb44-f6a7-4b42-a7c7-639dce139cb0...

    Hi-

    I am working on a task where i need to merge 2 calendars from seperate email accounts on Outlook. I am able to resolve 1st email but when I trying to resolve the second email, i get the message "Cannot resolve Recipient")

    I am on VPN for both the profiles (email 1 - client 1 vpn and email 2 - client 2 vpn)

    Attached is the code 

    Public Sub LoadLst(ByRef lst As Windows.Forms.ListView, ByVal Recp As String)

            lst.Items.Clear()

            Dim oNS As Outlook.NameSpace = oApp.GetNamespace("MAPI")

     

            Dim rsp As Outlook.Recipient

            rsp = oNS.CreateRecipient(Recp)

            rsp.Resolve()

            If rsp.Resolve Then

                Dim oCalander As Outlook.MAPIFolder = oApp.GetNamespace("MAPI").GetSharedDefaultFolder(rsp, Outlook.OlDefaultFolders.olFolderCalendar)

     

    Please help on what am I doing wrong and what could be the problem

     


    Ken Slovak MVP - Outlook
    lunedì 19 settembre 2011 13:33
    Moderatore
  • Thanks Ken for your Reply. I tried resolving by name but the problem is both are my emails which have the same last name SANDELA so the default mail is what its picking up i think because of GAL. My UI is pretty simple where i have a drop down which gets a list of emails from 

     For Each Acc As Outlook.Account In oApp.GetNamespace("MAPI").Accounts

                If Acc.SmtpAddress Is Nothing Then Continue For

                cmdListEmail.Items.Add(Acc.SmtpAddress)            

            Next

    The problem is my offshore team can get both the calendars on their machine and the issue is ONSITE ! They are pointing to the same servers as we are.

    Any help appreciated ! 

    lunedì 19 settembre 2011 18:51
  • Based on that setup it won't work unless you can use the SMTP address to create the recipient and not just an alias or name.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Vidya Sandela" <=?utf-8?B?VmlkeWEgU2FuZGVsYQ==?=> wrote in message news:8afe2724-9abc-4517-b9ae-05827d16ab2a...

    Thanks Ken for your Reply. I tried resolving by name but the problem is both are my emails which have the same last name SANDELA so the default mail is what its picking up i think because of GAL. My UI is pretty simple where i have a drop down which gets a list of emails from 

     For Each Acc As Outlook.Account In oApp.GetNamespace("MAPI").Accounts

                If Acc.SmtpAddress Is Nothing Then Continue For

                cmdListEmail.Items.Add(Acc.SmtpAddress)            

            Next

    The problem is my offshore team can get both the calendars on their machine and the issue is ONSITE ! They are pointing to the same servers as we are.

    Any help appreciated ! 


    Ken Slovak MVP - Outlook
    lunedì 19 settembre 2011 21:35
    Moderatore
  • Ken, thank you ! 

    If that is the case, why is the offshore team able to grab that information with the same setup ?

    lunedì 19 settembre 2011 21:55
  • Something must be different if it works in one place and not the other. If everything were identical it would work in both or neither. It could be the order of address book precedence, or entries in each GAL or aliases in ADUC or something else, but something is different.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "Vidya Sandela" <=?utf-8?B?VmlkeWEgU2FuZGVsYQ==?=> wrote in message news:3f945cef-ce9c-402e-b19d-3a109ddfb4f5...

    Ken, thank you ! 

    If that is the case, why is the offshore team able to grab that information with the same setup ?


    Ken Slovak MVP - Outlook
    lunedì 19 settembre 2011 22:00
    Moderatore