Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MAPI control probs (Access 97 SR2/VB6)

    Hi all,

    I've created set of modules in VBA that get inividual emails from an email string i.e. "philipj@education.co.uk;phil.jeary@blueyonder.co. uk".
    It then adds these to the various To, cc and bcc recipient lists.

    The way I know to do this involves using .RecipIndex = .RecipIndex + 1 before adding a recipient.
    If an extra index is added, is there a way to remove the index (I tried the above but with -1 and it didnt work), or do I need to program in avoiding adding an extra index in the first place?

    Any help would be much appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: MAPI control probs (Access 97 SR2/VB6)

    It's best to avoid increasing the RecipIndex without need. But if you have added a superfluous recipient, you can remove it by invoking

    MapMess.Delete mapRecipientDelete

    where MapMess is the name of the MAPIMessage control. This statement will remove the recipient corresponding to the current value of MapMess.RecipIndex. Just decreasing RecipIndex only means that you "point" to another, previously defined recipient, not that you delete the current one.

    Note: You should be able to consult the help file for the MAPI controls in VB6. In Access 97, it is not available because it is an HTML help file.

  3. #3
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MAPI control probs (Access 97 SR2/VB6)

    Excellent, thanks Hans.
    I have a bit of a problem with the help in VB in that, I installed a minimal amount of the MDSN library, then ran out of hard drive space - I need to do a bit of housekeeping then re-install some more!!!

    Housekeeping..... not everyones favorite task but it needs to be done.
    Thanks again Hans.

Posting Permissions

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