Results 1 to 8 of 8
  1. #1
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    636
    Thanks
    0
    Thanked 0 Times in 0 Posts

    email addresses using routingslip (2003 SP2)

    From Access, I output a report as an rtf doc. I then want to send it to several email addresses. Is there any way of adding email addresses using RoutingSlip.AddRecipient. From what I can deduce, it appears that .RoutingSlip.AddRecipient wants a person
    Regards,
    Peter

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

    Re: email addresses using routingslip (2003 SP2)

    The Route method checks each recipient against your address book and fails if it's not found. So you will either have to add all recipients to you address book, even if only temporarily, or use another method than a routing slip.

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    636
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: email addresses using routingslip (2003 SP2)

    Thanks Hans (again!). Sorry about posting this on the wrong board. I am doing all this in Access. so that was my first stop.
    That's a bummer! It would have been too simple & easy, and we could NEVER accuse MS of making things either simple or easy!
    Do you know if there is any way of getting email BCC addressees using .ActiveDocument.MailEnvelope.Item? (In line with the first para, probably not.)
    Regards,
    Peter

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

    Re: email addresses using routingslip (2003 SP2)

    You can add someone to the CC box by setting the recipient type to 2 (=olCc), but setting it to 3 (=olBcc) doesn't work consistently, the recipient sometimes gets added to the To box just as if you set the type to 1 (=olTo, the default value).

    With .ActiveDocument.MailEnvelope.Item
    .Recipients.Add("john@this.com").Type = 1 ' olTo
    .Recipients.Add("mary@that.com").Type = 2 ' olCc
    .Recipients.Add("dave@other.com").Type = 3 ' olBcc
    End With

  5. #5
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    636
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: email addresses using routingslip (2003 SP2)

    Thanks Hans.
    One wonders how long Type = 3 ' (=olBcc) hasn't worked correctly, and when (if ever) MS will fix it.
    Regards,
    Peter

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

    Re: email addresses using routingslip (2003 SP2)

    It seems to work better if you specify the BCC and CC recipient(s) before the To recipients.

  7. #7
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    636
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: email addresses using routingslip (2003 SP2)

    Thanks for that Hans. I tried it and it worked.
    Following on from this.
    1) Is there any way to send an email with only BCC addresses? I have tried a blank To field and all I get is an error.
    2) I want to send the same doc as an email again, with another person in the To Field. Does this line .Recipients.Clear clear the recipients? I can
    Regards,
    Peter

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

    Re: email addresses using routingslip (2003 SP2)

    1) I managed to send a message from Word with only a BCC address without problems.
    2) Clear is not a valid method. You can look up things like this in the Outlook VBA help - all these properties and methods are Outlook VBA.

    With .ActiveDocument.MailEnvelope.Item.Recipients
    Do While .Count > 0
    .Remove 1
    Loop
    End With

    If you want to test, use yourself as guinea pig, i.e. provide your own e-mail address. That way, you can send as often as you like (until you start to irritate yourself).

Posting Permissions

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