+ Reply to Thread
Results 1 to 24 of 24

On Behalf Of mail:(

  1. #1
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    On Behalf Of mail:(

    HI All,

    Can some one help me to complete teh codings below ??

    the below code is working fine but i need to sent the mails ON BEHALF OF someone else?

    Cousl you please get this be completed ?

    My cry for help..""

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: On Behalf Of mail:(

    Experts,

    Some one help me please ??

    Thanks.
    Safi.

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: On Behalf Of mail:(

    Hi, safi0102,

    did you look up the method SendMail in the VBE-Help? No SentOnBehalfOfName as parameter for SendMail available in my VBA-Help for either Excel2000 or Excel2010:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: On Behalf Of mail:(

    You will need to use the Outlook object to have access to the SentOnBehalfOfName property

    http://www.ozgrid.com/forum/showthread.php?t=163315
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: On Behalf Of mail:(

    Sorry Im newer to Excel Macro . VBA and VBE....etc.
    The above code has been created by experts in this Forum Site..!!
    Could you please amend or do something to send a mail on behalf of ?

    The Original thread for the above code creation.
    http://www.excelforum.com/excel-prog...html?p=3110963

    Thanks for your help..
    Im looking forward to hera from you..

    Thanks,
    Safi.
    Last edited by safi0102; 03-16-2013 at 09:09 AM.

  6. #6
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: On Behalf Of mail:(

    Holger,Andy

    Just tell me where do i want to insert teh Onbehalf of line ?

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: On Behalf Of mail:(

    You don't insert it. Your current macro has no capability to use that parameter, it doesn't exist in the SendMail method. Andy's link provides an excellent basic tutorial showing how you would ahve to use the Outlook object to send your email. By accessing the Outlook object, you have access to Outlook parameters like SendOnBehalfOf.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  8. #8
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: On Behalf Of mail:(

    JBYes, I have had a look on the tutorial and clears my part, But thing is taht do im choosing teh mail recipient for cell content and its using IF Function.


    The below part i was not able code using teh Tutorial Link provided by Andy..!!


    Could you please help me ?

    Thanks
    Safi.
    Please Login or Register  to view this content.

  9. #9
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: On Behalf Of mail:(

    Hi, safi0102,

    no chance with your current macro! Do you read it: not possible with your code, you need to rely on creating an Object in Outlook, not use SendMail.

    I`m out of this as TO keeps pushing wanting to use a method although it has been pointed out that itīs "Mission Impossible".

    Ciao,
    Holger
    Last edited by JBeaucaire; 03-16-2013 at 08:57 PM.

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: On Behalf Of mail:(

    Based on teh link of Andy's, the Outlook object method, you should be able to spot the line code that determines who the email is going "to".
    Please Login or Register  to view this content.
    So, using your code, you'll make changes along the lines of:

    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: On Behalf Of mail:(

    Hi JB<

    That's wonder full. Thanks for your Help..!!

    Could you please help me to sort this out fully ?

    I have amended the code as below. But it gives lot of errors

    Please Login or Register  to view this content.
    Thanks
    Safi.
    Last edited by safi0102; 03-18-2013 at 05:52 AM.

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: On Behalf Of mail:(

    Maybe:

    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: On Behalf Of mail:(

    Hi Jb,


    Thanks for your code and time.

    I ahve tried the coding but it gives an error and highlighting the line " On Error GoTo RunThisOnError"

    Can you please advise?

    Many thanks for your help.
    Safi.

  14. #14
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: On Behalf Of mail:(

    Take it out. that was from your macro and I have no idea why it is there.

  15. #15
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: On Behalf Of mail:(

    Perhaps what you really might want is to add this further up instead:

    Please Login or Register  to view this content.

  16. #16
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: On Behalf Of mail:(

    HI Jb,

    Thats wonderfull.. The code is working fine.. !!

    You have done a good job and gave me a solution.

    Cheers,
    Safi.

  17. #17
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: On Behalf Of mail:(

    If that takes care of your original query, please select Thread Tools from the menu above and mark the thread as solved. Thanks.

  18. #18
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: On Behalf Of mail:(

    Hi Jb,

    I will do taht now, Can you please advise one more thing please ?

    DO i want to fill teh White color for WHOLE SHEET.

    Can you give the code please ?

    Manythanks,
    Safi.

  19. #19
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: On Behalf Of mail:(

    Experts Can someone help me ?

    Thanks,
    Safi.

  20. #20
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: On Behalf Of mail:(

    Your latest question is not related to your thread. So its better you mark this as solved and open a new thread for your question.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  21. #21
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: On Behalf Of mail:(

    Thanks Arlu..!!

    I will post a new thread then..

    Cheers,
    Safi.

  22. #22
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Unhappy Re: On Behalf Of mail:(

    HI JB,

    I have ran teh macro, Just now i noticed taht the mail not sending for the 2nd row.

    Its just senduing teh mails of first row alone.

    I have atatched the file's Data Sheet and Macro sheet.. Please run the sheet so you can coome to know what is happening

    Can you please help ??

    Arlu,

    Can you also have look on this, Since you have written the code earlier. and JB made some amendments.


    Thanks Guys.
    Safi.
    Many thansk.
    Attached Files Attached Files

  23. #23
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: On Behalf Of mail:(

    Your formatting is a bit of mess. The whole point of INDENTING lines of code to specific positions is so that you can see where an IF and an END IF got together.
    By fixing the indents, I found an END IF halfway through your code that actually belonged all the way down near the bottom. Also, simplified a few other parts...

    Please Login or Register  to view this content.

  24. #24
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: On Behalf Of mail:(

    Thanks Mr. JB...!!!

    You are a Brilliant..

    Cheeers,
    Safi.

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