+ Reply to Thread
Results 1 to 6 of 6

Changing the sent FROM in vba.

  1. #1
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Changing the sent FROM in vba.

    I am clearly looking my mind here.

    I am trying to modify some code I found. It all works great just one thing, however: I need to have it send FROM a specific address, not my default and I cant get it to work. .SentOnBehalfOfName = "[email protected]" is not working.




    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Changing the sent FROM in vba.

    Please Login or Register  to view this content.
    OutMail is your defined mail item. objMsg is not defined. Use With OutMail or use Set objMsg = OutApp.CreateItem(0)
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Re: Changing the sent FROM in vba.

    Alpha, i am sorry for being an idiot here but I am just a hack. Not a programmer so i don't know what to do to the code to make it work. Whatever you belive the code best suited to make this work and the full code would help me SO much.
    Last edited by sungen99; 12-09-2020 at 02:01 PM. Reason: add more clairificaion.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Changing the sent FROM in vba.

    Uncomment (remove leading single quote) With OutMail

    Add comment (add single quote) 'With objMsg

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Re: Changing the sent FROM in vba.

    I get a runtime error

    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Changing the sent FROM in vba.

    What is the error description?
    What line is highlighted when you click the Debug button on the error dialog?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 18
    Last Post: 02-20-2018, 04:27 PM
  2. Changing OnExit event for control prevents changing records...
    By jik_ff in forum Access Tables & Databases
    Replies: 3
    Last Post: 12-31-2014, 03:09 PM
  3. Replies: 0
    Last Post: 10-22-2013, 01:04 PM
  4. [SOLVED] Changing CSE formula and changing Vlookup to Index Match
    By stockgoblin42 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-21-2013, 08:18 PM
  5. [SOLVED] Changing fill color of shapes based on changing cell value
    By Stefan1983 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2012, 10:33 AM
  6. Changing colour on changing a Data Validation List added with VBA
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-16-2011, 08:15 AM
  7. Replies: 0
    Last Post: 03-31-2011, 09:42 AM

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.6.0 RC 1