Results 1 to 5 of 5

Thread: **SORTED** MAPIMessages.Show

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2000
    Posts
    350

    Question **SORTED** MAPIMessages.Show

    Gang,

    If you do a MAPIMessages.Show and get your address book, when you select a name and perhaps click it into the 'To' field, it doesn't go straight into the message.

    Does anyone know if the selected or clicked name is actually put somewhere as eg a variable, and if so where?
    Last edited by Jim Brown; Oct 23rd, 2002 at 03:30 AM.
    .

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2000
    Posts
    350
    bump
    .

  3. #3
    Frenzied Member swatty's Avatar
    Join Date
    Aug 2002
    Location
    somewhere on earth
    Posts
    1,478
    maybe they are stored in one of the following propertys
    VB Code:
    1. MAPIMessages.RecipDisplayName
    2. MAPIMessages.RecipAddress

    Do you know by any chance how I can retrieve the address list through code ??
    Code:
    If Question = Incomplete Then
       AnswerNextOne
    Else
       ReplyIfKnown
    End If
    cu Swatty

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2000
    Posts
    350
    That's what I thought Swatty! And it is the case in fact!

    But what I was doing wrong was doing the .Show before the .Compose so there was no compose buffer operational when I clicked a name. Putting the .Compose first did the trick.

    And no, I've nfc how to access the address list directly. That's actually what I would have preferred in this case anyway.
    .

  5. #5
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Newbury, UK
    Posts
    1,878
    Outlook (NOT Outlook Express) address lists should be available as:
    VB Code:
    1. Set myOLapp = CreateObject("Outlook.Application")
    2. Set mynamespace = myOLapp.GetNameSpace("MAPI")
    3. Set myaddresslist = mynamespace.AddressLists("Personal Address Book")
    4. 'Set myAddressList = myNameSpace.AddressLists("Global Address List")
    5. Set myAddressEntries = myaddresslist.AddressEntries
    6.     MsgBox "There are this many: " & myAddressEntries.Count
    7.     MsgBox "The first address is: " myAddressEntries(1).Address
    8. Set myAddressEntries = Nothing
    9. Set myaddresslist = Nothing
    10. Set mynamespace = Nothing
    11. Set myOLapp = Nothing

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