+ Reply to Thread
Results 1 to 3 of 3

Thread: Populating FROM field in Outlook from Excel

  1. #1
    Registered User
    Join Date
    06-14-2010
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Populating FROM field in Outlook from Excel

    Hi,

    First time poster. I have a little application that send an e-mail from the users account to a specified e-mail address (lots of help on the forums on To and Body etc). This has all been very easy, until it was requested to have the "From" field populated. The department wants the replies to go to a central address. Current code, but it falls over at .From.

    Sub SimpleMail()
    
        
        Set olApp = CreateObject("Outlook.application")
    
        Set m = olApp.CreateItem(olMailItem)
        
         
        
        With m
    
            .Subject = Sheets("Master").[H4].Value
    
            .To = "email1@domain.com"
    
            .Body = ActiveSheet.Range("C7").Text & vbCrLft
            
            .From = "email3@domain.com"
    
            .Send
            
    
        End With
    
    End Sub
    Last edited by Saffa; 06-14-2010 at 08:06 AM. Reason: add code tags for newbie PM warning

  2. #2
    Forum Guru Domski's Avatar
    Join Date
    12-14-2009
    MS-Off Ver
    What does it matter?
    Posts
    3,933

    Re: Populating FROM field in Outlook from Excel

    Try:

    .SentOnBehalfOfName = "email3@domain.com"

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    06-14-2010
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Populating FROM field in Outlook from Excel

    Works perfectly, thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0