+ Reply to Thread
Results 1 to 4 of 4

Help with translating mailto: into VB code

  1. #1
    Registered User
    Join Date
    03-27-2012
    Location
    Sofia
    MS-Off Ver
    Excel 2010
    Posts
    46

    Help with translating mailto: into VB code

    Hello guys,

    Can anyone please help me with this if possible:

    For my daily work I have an Excel file and I send out a lot of emails, so I am trying to optimize a little bit.
    I already have a "hyperlink" formula set up, but the body of my emails is getting larger and the mailto character limitation is starting to catch up with me, so I was trying to write a VB code instead.

    I read some of the posts of Ron de Bruin, but there are a couple of things i cannot figure out:

    i have the following mailto command:
    Please Login or Register  to view this content.
    and just extended it about 1000 times (on 1000 rows) so that it would take relevant data from each row (on each row i have name, ticket number, reference and i made a field with "CONCATENATE" to gather info from the other columns to make out the body)

    I tried to write the following code, based on info from Ron's site:
    Please Login or Register  to view this content.
    my question is how would i have to program this, so that I would have this functionality for each separate row. is it possible to "extend" this code, as I did with the =hyperlink (just dragged it for about 1000 rows and it works with the information from each row, so that each email contains the respected information) or maybe do something with the [D2] ?

    Also, what would the .send mechanism be, so that the code can have functionality, similar to the hyperlink - compose the email but not send it as i have to format a couple of things additionally. Is that what the .Display would do?

    your help would be greatly appreciated and I hope that you guys can understand what I am trying to accomplish!

    Thanks in advance.

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

    Re: Help with translating mailto: into VB code

    Not using the [D2] syntax. You would have to introduce a loop that you could use a variable for the numeric part of that address, so you will have to switch to the Range() or Cells() syntax.

    Please Login or Register  to view this content.
    _________________
    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!)

  3. #3
    Registered User
    Join Date
    03-27-2012
    Location
    Sofia
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Help with translating mailto: into VB code

    @JBeaucaire: Thank you very much this information. I appreciate it very much.

    Another question about the new issue, that I am facing now, is how would I introduce the "button" in the sheet itself, so that it would call (execute) this command in the sheet (like the hyperlink I had previously)

    Thank you in advance guys.

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

    Re: Help with translating mailto: into VB code

    To show the Developer tab for Microsoft Office 2010 applications
    1. Start the application.
    2. Click the File tab.
    3. Click Options.
    4. In the categories pane, click Customize Ribbon.
    5. In the list of main tabs, select Developer.
    6. Click OK to close the Options dialog box.

+ 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