Results 1 to 27 of 27

Thread: Outlook Address from Alias

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2003
    Location
    Out there somewhere!
    Posts
    386

    Question Outlook Address from Alias

    Is there anyway in VB, using the outlook object, to get the e-mail address for a given alias?


    Help please.


    Kev.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710
    You mean the 'Display As' for a ContactItem?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2003
    Location
    Out there somewhere!
    Posts
    386
    Nope. In the properties there is an alias field. In our case we hold the user id there and that is what I want to search on to get the address.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2003
    Location
    Out there somewhere!
    Posts
    386
    Can it be done?

    Coz I can't find anything??

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710
    I take it that this is a custom field? In MailItem or ContactItem?

    Anything can be do if you have the persistance and patience.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2003
    Location
    Out there somewhere!
    Posts
    386
    Nope, as far as I know it's not a custom field. It's a field in the address book properties.

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710
    Ah! Its not really the Address book, its the Global Address List. There
    is no Alias field or property for a Contact, but let me whip up
    something for this then.


    Attached Images Attached Images  
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710
    Not possible with OOM. You need to use CDO in order to access
    that property. Is using CDO a possibility for you?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710
    @%@$%, my vb crashed on the demo I had just finished for you
    using CDO. When I get home tonight I will re-write it and post it.
    It works great! Wish I had done a save.

    I had it loading the entire GAL and showing all the Alias' and
    email addresses. Even had a double click on the listview to bring
    up the details of the Address Entry.

    Oh well.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2003
    Location
    Out there somewhere!
    Posts
    386
    I really don't know anything about CDO!?

    But we can use it I think!!!

  11. #11
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Talking

    Well here it is in case you can use CDO. If you did a full install of
    Outlook it should be installed already. If not you can install it from
    the Outlook CD. Its Microsoft Collaboration Data Objects 1.21.

    For client applications, you must install Outlook in order to install
    CDO. In Outlook 2000 and later versions, CDO is included with
    Outlook but is not part of the default setup, nor will it install on
    first run. Therefore, you must explicitly select it during a custom
    setup or use the Windows Installer object library to
    programmatically install CDO

    I cleared out some of the names and blocked the email address
    from showing so they wont get spammed just in case, but it does
    fillup the listview.





    VB Code:
    1. Option Explicit
    2. 'Add reference to MS CDO 1.21 Library
    3. 'Add reference to MS Office Outlook xx.x Object Library
    4. 'Add listview control (lvwGAL) 'Project > Components > MS Windows Common Controls 6.0
    5. 'Add 2 command buttons (cmdClose) and (cmdRefresh)
    6. Private moApp As Outlook.Application
    7. Private moNS As Outlook.NameSpace
    8. Private moCDO As MAPI.Session
    9.  
    10. Private Const cdoPR_DISPLAY_NAME As Long = &H3001001E
    11. Private Const cdoPR_ACCOUNT As Long = &H3A00001E
    12. Private Const cdoPR_GIVEN_NAME As Long = &H3A06001E
    13. Private Const cdoPR_SURNAME As Long = &H3A11001E
    14. Private Const cdoPR_EMAIL As Long = &H39FE001E
    15.  
    16. Private Sub cmdClose_Click()
    17.     Unload Me
    18. End Sub
    19.  
    20. Private Sub cmdRefresh_Click()
    21.     GetAddressCDO
    22. End Sub
    23.  
    24. Private Sub Form_Load()
    25.    
    26.     On Error GoTo No_Bugs
    27.    
    28.     'INITIALIZE OOM (JUST SO CDO CAN LOGON TO INSTANCE)
    29.     Set moApp = GetObject(, "Outlook.Application")
    30.     If TypeName(moApp) = "Nothing" Then
    31.         Set moApp = New Outlook.Application
    32.     End If
    33.     Set moNS = moApp.GetNamespace("MAPI")
    34.     'INITIALIZE CDO
    35.     Set moCDO = CreateObject("MAPI.Session")
    36.     moCDO.Logon "", "", False, False
    37.     'INITIALIZE LISTVIEW
    38.     With lvwGAL
    39.         .FullRowSelect = True
    40.         .LabelEdit = lvwManual
    41.         .MultiSelect = False
    42.         .View = lvwReport
    43.         .ColumnHeaders.Add , , "", 0
    44.         .ColumnHeaders.Add , , "Display Name", (.Width / 5) - 70
    45.         .ColumnHeaders.Add , , "Last Name", (.Width / 5) - 70
    46.         .ColumnHeaders.Add , , "First Name", (.Width / 5) - 70
    47.         .ColumnHeaders.Add , , "Alias", (.Width / 5) - 70
    48.         .ColumnHeaders.Add , , "E-Mail", (.Width / 5) - 70
    49.         .Sorted = True
    50.         .SortOrder = lvwAscending
    51.         .SortKey = 1
    52.     End With
    53.     'POPULATE LISTVIEW
    54.     GetAddressCDO
    55.     Exit Sub
    56.    
    57. No_Bugs:
    58.     If Err.Number = 429 Then
    59.         Resume Next
    60.     Else
    61.         MsgBox Err.Number & " - " & Err.Description, vbOKOnly + vbExclamation
    62.     End If
    63. End Sub
    64.  
    65. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    66.     moCDO.Logoff
    67.     Set moCDO = Nothing
    68.     Set moNS = Nothing
    69.     Set moApp = Nothing
    70. End Sub
    71.  
    72. Private Sub lvwGAL_DblClick()
    73.     On Error Resume Next
    74.     Dim oDetails As Object
    75.     Set oDetails = moCDO.GetAddressEntry(lvwGAL.SelectedItem)
    76.     oDetails.Details
    77.     Set oDetails = Nothing
    78. End Sub
    79.  
    80. Private Sub GetAddressCDO()
    81.  
    82.     On Error GoTo No_Bugs
    83.    
    84.     Dim oAEntries As Object
    85.     Dim oAEntry As Object
    86.     Dim oFields As Object
    87.     Dim lvItm As ListItem
    88.     Dim i As Integer
    89.     Dim ii As Integer
    90.     Dim iii As Integer
    91.     Dim vDetails As Variant
    92.     Dim lRet As Long
    93.    
    94.     lvwGAL.ListItems.Clear
    95.     Set oAEntries = moCDO.AddressLists.Item("Global Address List").AddressEntries
    96.     For i = 1 To oAEntries.Count
    97.         Set oAEntry = oAEntries.Item(i)
    98.         Set lvItm = lvwGAL.ListItems.Add(, , oAEntry.ID)
    99.         'ITERATE THROUGH ALL FIELDS OF THIS ADDRESS ENTRY
    100.         For ii = 1 To oAEntry.Fields.Count
    101.             Set oFields = oAEntry.Fields(ii)
    102.             vDetails = oFields.Value
    103.             On Error Resume Next
    104.             lRet = UBound(vDetails)
    105.             If Err.Number = 0 Then
    106.                 'ITERATE THROUGH ALL VALUES FOR THIS ARRAY
    107.                 For iii = 0 To UBound(vDetails)
    108.                     'Debug.Print "Field ID:  " & oFields.ID & "; Field Array #" & iii & ";Value:  " & vDetails(iii)
    109.                 Next
    110.             Else
    111.                 'ADD SINGLE VALUES TO THE LISTVIEW
    112.                 If oFields.ID = cdoPR_DISPLAY_NAME Then
    113.                     lvItm.SubItems(1) = vDetails
    114.                 ElseIf oFields.ID = cdoPR_SURNAME Then
    115.                     lvItm.SubItems(2) = vDetails
    116.                 ElseIf oFields.ID = cdoPR_GIVEN_NAME Then
    117.                     lvItm.SubItems(3) = vDetails
    118.                 ElseIf oFields.ID = cdoPR_ACCOUNT Then
    119.                     lvItm.SubItems(4) = vDetails
    120.                 ElseIf oFields.ID = cdoPR_EMAIL Then
    121.                     lvItm.SubItems(5) = vDetails
    122.                 End If
    123.                 'Debug.Print "Field ID:  " & oFields.ID & "; Value  " & vDetails
    124.             End If
    125.         Next
    126.         Set lvItm = Nothing
    127.     Next
    128.     Set oAEntries = Nothing
    129.     Set oAEntry = Nothing
    130.     Set oFields = Nothing
    131.     Exit Sub
    132.    
    133. No_Bugs:
    134.     MsgBox Err.Number & " - " & Err.Description, vbOKOnly + vbExclamation
    135. End Sub


    VB/Outlook Guru!!!
    Attached Images Attached Images  
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  12. #12
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961
    Originally posted by RobDog888

    Anything can be do if you have the persistance and patience.
    Spoken like a true code warrior.

  13. #13
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710
    Actually I finished the re-write after the crash yesterday. It took
    me about 30 minutes to do this. I just didn't have the time to
    make it look nice and post because I was on overtime and I had
    to go home.

    Although the one issue is still the security popup, but I wrote
    something this morning that I like to call "Outlook® Security
    Prompt Dismisser™" or "DismissMe™" coming to a download site
    near you soon. It took me about an hour to figure out that M$
    placed a block on the message stream preventing the security
    prompt from being automated in later versions of Outlook. But I
    found a way around it in about another hour or so. Actually very
    simple. M$ can't do anything about it either


    VB/Outlook Guru!
    Last edited by RobDog888; Sep 17th, 2004 at 02:38 PM.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  14. #14
    Addicted Member
    Join Date
    Sep 2005
    Posts
    151

    Re: Outlook Address from Alias

    Hey Robdog, I tried ur above code.
    I have added reference to cdo 1.21
    But its giving me error.

    Run-time error'2147219963(80040605)
    Collaboration Data Objects-[MAP_E_Not_INITIALIZED(80040605)]]

    What i have to do if i want only firstname and lastname in a listview?

    Thanks!

  15. #15
    New Member
    Join Date
    Oct 2001
    Posts
    5

    Re: Outlook Address from Alias

    Hi RobDog,
    That sample code works perfectly. However, i'm trying to get the data from an exchange 2000 server with 51k entries which obviously takes quite a bit of time (over 10 mins). The good news is that our lists are broken down into different groups,and I need to get the address list for IRELAND-->Receipients.
    I've tried variations on /vbcode "Set oAEntries = moCDO.AddressLists.Item("Flextronics.IRELAND.Recipients").AddressEntries" /endvbcode
    but i get the error:
    -2147221233 - [Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]].

    Any help would be appreciated,

    thanks
    Attached Images Attached Images  

  16. #16
    New Member
    Join Date
    Aug 2006
    Posts
    1

    Re: Outlook Address from Alias

    i got a lot of error of this source code ...>__< is it wrote by VB 03 ?

    would you mind sending me the souce code to translate to VB 05 ?

  17. #17
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Re: Outlook Address from Alias

    I sent you a reply in your PM.

    Basically, this code is VB 6 and CDO 1.21 which are not compatible with VB.NET.

    I'll try to get a .NET version out this week sometime when I have some free time.

    Ps, I will add it to my FAQ, when I can this week, that I will be publishing in the Office Development forum tomorrow hopefully.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  18. #18
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Outlook Address from Alias

    Quote Originally Posted by RobDog888
    Although the one issue is still the security popup, but I wrote
    something this morning that I like to call "Outlook® Security
    Prompt Dismisser™" or "DismissMe™" coming to a download site
    near you soon.
    Great code, Rob. Did you ever post your dismisser? A search on DismissMe doesn't find anything, not even this post of yours.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  19. #19
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Re: Outlook Address from Alias

    No I didnt because I needed to change it for protection of disassembly of the exe/dll and add a program registration scheme. Another project that I hopefully will be getting done real soon too. My delimma is if I should make it freeware or commercial and charge a very small fee for it? Would anyone pay $ for it when there is at least one other similar product for free?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  20. #20
    Junior Member
    Join Date
    Jul 2003
    Posts
    25

    Re: Outlook Address from Alias

    Any further progress? I'm looking at developing an automated mailer in VB6 and that Outlook message is a real PITA.

  21. #21
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Outlook Address from Alias

    There are other ways to send email in VB6 without even using outlook - look into CDO.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  22. #22
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Re: Outlook Address from Alias

    CDO will also generate the security popup.

    I have the code on my server but I havent had time to replace the crashed hd and recover the data.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  23. #23
    New Member
    Join Date
    Jan 2012
    Posts
    3

    Re: Outlook Address from Alias

    thank you all of guys, i have done it

    Dim mail As MailItem
    Dim insp As Inspector

    Set insp = Application.ActiveInspector
    Set mail = insp.CurrentItem
    Debug.Print mail.To

  24. #24
    Registered User
    Join Date
    Dec 2014
    Posts
    2

    Re: Outlook Address from Alias

    Hi Rob,
    Stupid question time... Is there a form that you created to use the code you have provided?
    Can you provide an example at all?
    I have the exact same problem as the OP and this code should solve the problem for me... I hope.
    Thanks!!

  25. #25
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Re: Outlook Address from Alias

    You mean post #11?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  26. #26
    Registered User
    Join Date
    Dec 2014
    Posts
    2

    Re: Outlook Address from Alias

    Quote Originally Posted by RobDog888 View Post
    You mean post #11?
    Yep that's the one. Total noob so any help would be great.

  27. #27
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Re: Outlook Address from Alias

    Its VB6 code and you just have to create a new form and drop the code in and create the buttons and controls as mentioned in the commented code
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width