Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: ActiveX Controls for Outlook (OfficeXP)

    Regarding the 255 character limit, if you have the name, can't you go back and retrieve the rest of the information in a separate pass? I suppose duplicate names could be a problem. Hmmm...

  2. #17
    2 Star Lounger
    Join Date
    May 2003
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ActiveX Controls for Outlook (OfficeXP)

    We dont' have any duplicate names, because if someone has the same name as another person, then there is a description of the area they work in (eg "Jscher (ABC)" and "Jscher (XYZ)". This prevents us sending e-mails to the wrong person.

    I am struggling a lot with the Outlook Object Model. I have a lot of trouble writing simple code to lookup the address details of a name, or to look up all the names for a distribution list. I hope it starts to make some sense soon. If you have any sample code to lookup details, or members of the address list then this would be appreciated.

    One more comment, is that when the I use the "<PR_DISPLAY_NAME>" tag in the GetAddress dialog box, it only ever returns the name and none of the other address details.

  3. #18
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: ActiveX Controls for Outlook (OfficeXP)

    > I am struggling a lot with the Outlook Object Model.

    Well, the dialog we're working with is something of a throwback. Once you retrieve unique names from that dialog, you have a broad array of tools to look them up in Outlook. I guess that doesn't make it any simpler, though.

    > One more comment, is that when the I use the "<PR_DISPLAY_NAME>" tag in the GetAddress dialog box, it only ever returns
    > the name and none of the other address details.

    Sorry if my example misled you. Since you didn't post your cTags definition, I just made up something that worked for my testing (Name, Phone, Email).

  4. #19
    2 Star Lounger
    Join Date
    May 2003
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ActiveX Controls for Outlook (OfficeXP)

    Do you know of any posts on this site that demonstrate tools that I can use to retrieve the address details, when I have the name?

    Thank you very much for all your help.

  5. #20
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: ActiveX Controls for Outlook (OfficeXP)

    Not off the top of my head. But, if I recall correctly, GetAddress should allow this, using the Name parameter and no dialog. Does it work?

  6. #21
    2 Star Lounger
    Join Date
    May 2003
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ActiveX Controls for Outlook (OfficeXP)

    Jscher, thank you so much! What a simple, and yet effective solution. You really are brilliant. <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30> This effectively addresses the limitation of only 255 characters from the GetAddress dialog box.

    My last tricky question, is how do I return the names of all the people, if a distribution list is chosen from the GetAddress dialog box. I have been searching through the Outlook Object Model, and I can't understand how to access the DistListItem. Any suggestions?

  7. #22
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: ActiveX Controls for Outlook (OfficeXP)

    Regarding the distribution list, I thought JohnBF posted some code for somebody on that just last month over on the Outlook board. But I'll admit my memory isn't what it once was.

  8. #23
    2 Star Lounger
    Join Date
    May 2003
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ActiveX Controls for Outlook (OfficeXP)

    JohnBF pointed to this earlier in this thread. The code requires that you have the ContactItem selected. How do I find the Distribution List contact item? Do I have to search through every folder or AddressList to find it? or is there a quicker way.

  9. #24
    Super Moderator
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,507
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Re: ActiveX Controls for Outlook (OfficeXP)

    I have been trying to follow this but it has gone way over my head because I don't know Word's Fields and Object Model at all. And I can see the value in the process you are developing, Marie-Therese. So if I can pester you both with some questions ...

    GetAddress returns a string. If the user selects both DistList and Individual contact Items, are you saying that the process will have to be to parse each name from the string and then run each DistList name back through Get Address? How will you tell the difference between a DistList name string and a Contact string with an empty Address field?

    Is there another Word Method similar to GetAddress that is just 'GetName', which can then be run against the Contact Items?

    (I also don't understand how you would run this kind of code against non-default Contact Folders.)

    Marie-Therese, I would really like to see you post all your related code as an attachment.
    -John ... I float in liquid gardens
    [acronym title="Gday mate!"][/acronym] [acronym title="What up Dude?"][/acronym] UTC -7±DS

  10. #25
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: ActiveX Controls for Outlook (OfficeXP)

    <P ID="edit" class=small>(Edited by jscher2000 on 08-Jan-04 15:56. Added the italicized clarification.)</P>There's a way to search a folder for the list. Check the VBA help for the Find method of Outlook's Items collection. If the list isn't in the default Contacts folder, it will take a bit more work to navigate to it (using the Folders("First Level").Folders("Second Level").... method of specifying the path).

  11. #26
    2 Star Lounger
    Join Date
    May 2003
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ActiveX Controls for Outlook (OfficeXP)

    Edited by HansV to move very long code to attachment.

    Here is the final code that enables you to select names from an address list, and it puts into the ListView control all the names, addresses, etc...When it looks for the members of the Distribution List, it does not limit it to the Global Address Book, but searches every address list until it finds it.

    Thank you to everyone who helped with this.

Page 2 of 2 FirstFirst 12

Posting Permissions

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