+ Reply to Thread
Results 1 to 23 of 23

Emailing; Find identity of sender

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,062

    Emailing; Find identity of sender

    I've got a macro that will email a spreadsheet out to any of a dozen people. Each of these people will need to use this macro to send a copy of their spreadsheet to me and my boss, but not necessarily to everyone on their list. I know how to send it to me, and to my boss, but how does Excel know to send it also to the person who's sending it (I know they can go to their outbox to retrieve it, but for neatness sake I'd like them to get a copy in thier inbox). I'm using Outlook 2003 and Excel 2003.
    Last edited by jomili; 12-29-2009 at 02:03 PM. Reason: Problem is fixed

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Emailing; Find identity of sender

    Hello jomili,

    What you are describing is know as a "Blind Carbon Copy", abbreviate BCC. Set this property in the Outlook MailItem and assign your email and your boss's email to it as a semicolon separate string.

    Example
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,062

    Re: Emailing; Find identity of sender

    Leith,

    I'm sorry, my post wasn't clear enough.

    The routine will be run by about a dozen people. Already it emails me and my boss. What I want is for the report to mail itself to the SENDER, whoever that sender is, rather than having them go to their "Sent Items" for a copy.

    Since I don't know who will be sending, I can't hardcode their email address in.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Emailing; Find identity of sender

    Hello jomili,

    For example, I email the report to you. I should then in turn receive an email to myself of the email I just sent you? Is this report an attachment?

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,062

    Re: Emailing; Find identity of sender

    Yes.

    The userform boils a lot of information out of various spreadsheets and puts it into a small report which tells my users what problems they need to look into.

    It sends a copy of that report as an attachment to an email to me and to my boss, so we know that 1) the user DID run the report, and 2) they ran it at THIS time. The user as well needs to keep a copy of the email in case there are ever any questions. While they could retrieve it from their sent mail, I would much prefer that they instead also get copied on the email.

    Possble?

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Emailing; Find identity of sender

    Hello jomili,

    Yes, it is possible. The user will then have a copy in his or her inbox and a copy in the sent items folders. It has been awhile, but if I remember right, accessing the "sender" property will pop up another security dialog. I'll write up a macro and test it before I post back with it.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Emailing; Find identity of sender

    Just as an alternative - have you considered creating an Outlook rule in your own mailbox to reply to the sender as and when you receive the email ?

    If the email issued has a specific subject it should be fairly trivial to setup...

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Emailing; Find identity of sender

    Hello jomili,

    I was right about the "Sender" property. To get around answer the pop up twice, I decide to smply copy the last email sent to the Inbox. Here is an example...
    Please Login or Register  to view this content.

  9. #9
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,062

    Re: Emailing; Find identity of sender

    Leath,

    Sorry I haven't replied, I was on Christmas vacation. I tried adding your code to my mail routine, and it didn't work for me. I've posted the full code below for your perusal, so hopefully you can point out where I've messed up. I THINK it may be this line:
    Please Login or Register  to view this content.
    because it seems to me there should be a period or something between Move and olInBox. Here's the full code:
    Please Login or Register  to view this content.

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Emailing; Find identity of sender

    Hello jomili,

    A general description such as this "It didn't work for me." is meaningless. What did the code do or not do? Was there an error and if so, what whats the error number and description? Did the email get sent? Did the email fail to be copied over to the in box?

  11. #11
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,062

    Re: Emailing; Find identity of sender

    Sorry, I guess I could have been clearer. What I meant was that there was no change. The email and worksheets are still being sent to the addressee, and I still have a copy in my sent items, but don't have a copy in my inbox. No error message, it just didn't copy it.

  12. #12
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Emailing; Find identity of sender

    Hello jomili,

    Do you have another in box you are using other than your default in box?

  13. #13
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,062

    Re: Emailing; Find identity of sender

    I don't know which is the default. Under "Documents and Settings" the following accounts are set up on my computer:

    Administrator
    All Users
    Default User
    Business_local
    jomili
    Mary
    Ted
    Alice

    Mary, Ted and Alice used my computer before I got here, and our IT dept doesn't wipe everything clean for the next user. In Outlook, when I open it asks which profile to use, and my only options are Outlook or jomili. I choose the latter. I think for my users across Texas they've got a similar situation.

  14. #14
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Emailing; Find identity of sender

    Hello jomili,

    Since each logged on user has a separate account and you seem to be using the default Outlook setup, I am not sure why the email isn't being copied. I ran the code to be sure it worked. I have 2 accounts that I use: Outlook and Gmail. I see the sent email copied into both the Outlook and Gmail in-boxes. Perhaps you should take this up with you IT staff. It maybe something to do with your network configuration.

  15. #15
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,062

    Re: Emailing; Find identity of sender

    I guess I'll have to do that, or educate my users to retrieve a copy from their sent items. Thanks loads for trying. Should I mark this thread as "Solved", or leave it open in the hope that someone else might have an idea?

  16. #16
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Emailing; Find identity of sender

    Hello jomili,

    Leave it "unsolved". After you talk to IT, post back with an update on what you find out.

  17. #17
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,062

    Re: Emailing; Find identity of sender

    Hold it, I have some questions:

    1) Shouldn't we Dim olSentItems and olInBox as something?
    2) Where do the numbers on the DefaultFolders (5 and 6) come from? Could they be different on my machine?
    3) I've put this macro in Excel; should it be an Outlook macro instead?

  18. #18
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Emailing; Find identity of sender

    Hello jomili,

    1) Shouldn't we Dim olSentItems and olInBox as something?

    A. In the macro I posted olSent is dimensioned as an object.


    2) Where do the numbers on the DefaultFolders (5 and 6) come from? Could they be different on my machine?

    A. These come from Outlook. Because the Outlook Application is created using late binding, the constants in Outlook can not be retrieved. There values are used instead. If you are using Outlook 2003, the values will be the same.


    3) I've put this macro in Excel; should it be an Outlook macro instead?

    A. It belongs in Excel.

  19. #19
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,062

    Re: Emailing; Find identity of sender

    Leath,

    I beg to differ with point A. Here's the first part of the code you originaly posted:
    Please Login or Register  to view this content.
    Should I Dim OlInBox and olEmail as Objects? Will that make any difference?

    On B, I AM using Outlook 2003, so I guess the folder names should be right. I'm just trying to cover all the basics before I appeal to IT.

    Thanks,
    Jomili

  20. #20
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Emailing; Find identity of sender

    Hello Jomili,

    Both variables are objects and should be declared. The corrected example would be this:
    Please Login or Register  to view this content.
    By the way, what did you find out about your network email setup from IT?

  21. #21
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,062

    Re: Emailing; Find identity of sender

    Leath,

    It (ALMOST) works! It's not copying the letter just sent, but instead it's copying the one before the one I just sent. Maybe a slowdown in the mail process (ie: it's not getting to my sent items before Excel pulls from my sent items)? Can we put a delay in?

  22. #22
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,062

    Re: Emailing; Find identity of sender

    Never mind. I looked online and found the answer. I changed my macro to add a timer line:
    Please Login or Register  to view this content.
    That adds a 3 second delay, which appears to work. I may see if I can shorten it, but for now a 3 second delay is liveable.

    Thanks for all your help, and sorry I didn't figure it out sooner. I should have remembered that everyone else's equipment is much faster than mine.

    I'm marking this one solved, and posting my finished (working) code below. If you can point out ways to make it more effecient please do so.
    Please Login or Register  to view this content.

  23. #23
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Emailing; Find identity of sender

    hi all,

    It sounds like you're sorted with the help from Leith
    I've previously used a Constants sheet within the file where the email strings were listed & then drawn into the macro using named ranges.


    However, I thought I would throw this link in (http://www.rondebruin.nl/mail/folder3/signature.htm) as it may be of interest to people searching this thread.

    hth
    Rob
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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