Consulting

Results 1 to 3 of 3

Thread: Changing the from: adress from an email send within Excel

  1. #1

    Changing the from: adress from an email send within Excel

    Hi guys,

    I am using an excel database to select emailadresses and then send an email to selected adresses. Now when i send it from a company computer it sends it from my own emailadress (myname@mycompany.nl), we use an exchange server which also allows me to send mail from the 'info' mail we use for customers. (mycompany@info.nl). Now I have tried several things but
    [vba]
    .senderemailadress
    [/vba]
    is a read-only property and i cant find out how i can chance the send from, i managed to set a .replyto adress but it still shows where the mail originated from. So I either want the from adress hidden or want to chance it with the other one.

    tia
    Frank

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by Regouin
    Hi guys,

    I am using an excel database to select emailadresses and then send an email to selected adresses. Now when i send it from a company computer it sends it from my own emailadress (myname@mycompany.nl), we use an exchange server which also allows me to send mail from the 'info' mail we use for customers. (mycompany@info.nl). Now I have tried several things but
    [vba]
    .senderemailadress
    [/vba]
    is a read-only property and i cant find out how i can chance the send from, i managed to set a .replyto adress but it still shows where the mail originated from. So I either want the from adress hidden or want to chance it with the other one.

    tia
    Frank
    Frank,

    I would have thought you need to login to that account and then send it.

    [vba]
    Set oOutlook = CreateObject("Outlook.Application")
    Set oNameSpace = oOutlook.GetNameSpace("MAPI")


    oNameSpace.Logon profile, Password, True
    [/vba]

  3. #3
    hi,

    thanks for replying, well the thing is that i get mail from both mail-adresses and when i am using outlook i can easily swap around which adress i want to use. So i was thinking that it was just a mail property. But i tried everything and havent found the right syntax. maybe i am overlooking something here. it is an exchange server and the mail-adresses are linked to your login on the network i believe.

    if you have any further questions dont hesitate to ask.

    tia
    frank

Posting Permissions

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