+ Reply to Thread
Results 1 to 7 of 7

Add hyperlink to Outlook mail with variable text

  1. #1
    Registered User
    Join Date
    07-16-2014
    Location
    Washington
    MS-Off Ver
    2010
    Posts
    37

    Add hyperlink to Outlook mail with variable text

    Hi everyone,

    I'm trying to insert a hyperlink into a new Outlook email item where the hyperlink contains a variable, the variable is a Ticket ID the user enters in a Textbox on a Userform.

    I've only got code working to open a new Outlook email then insert the text from the userform. Beyond that I've been trying a few things but nothing has worked. Any help is appreciated!

    Please Login or Register  to view this content.
    Last edited by askpcguy; 07-31-2014 at 12:39 AM.

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

    Re: Add hyperlink to Outlook mail with variable text

    Try something like this...

    Please Login or Register  to view this content.
    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
    Registered User
    Join Date
    07-16-2014
    Location
    Washington
    MS-Off Ver
    2010
    Posts
    37

    Re: Add hyperlink to Outlook mail with variable text

    That's darn close AlphaFrog! Is there a way to make Text To Display the TextBox1.Value?

    I've got this thus far.

    Please Login or Register  to view this content.

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

    Re: Add hyperlink to Outlook mail with variable text

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-16-2014
    Location
    Washington
    MS-Off Ver
    2010
    Posts
    37

    Re: Add hyperlink to Outlook mail with variable text

    Ah, the spaces around the TextBox1.Value kept driving me insane. I finally figured out I was trying to concatenate a string with a variable value, but that works great AlphaFrog. I can't +rep so if you've got a paypal email you can PM me, I insist lunch is on me.

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

    Re: Add hyperlink to Outlook mail with variable text

    You were so close on your attempt, but you get it now. It's just about concatenating a text string of the the HTML code with the Textbox.value.

    Glad it worked; pay it forward. It would be nice to leave a note on how you eventually paid, but it's not required.

  7. #7
    Registered User
    Join Date
    07-16-2014
    Location
    Washington
    MS-Off Ver
    2010
    Posts
    37

    Re: Add hyperlink to Outlook mail with variable text

    How about this, say someone wants to use a variable for the http:// page within the .HTMLBody object, here's what I did.

    Please Login or Register  to view this content.

+ 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. [SOLVED] Help needed : Linking outlook standard mail format with excel hyperlink
    By Elangovan89 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-03-2014, 08:09 AM
  2. [SOLVED] How to copy table from Outlook mail body in to text file
    By Draconi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2013, 02:43 AM
  3. Convert text into bitmap and paste on mail body of outlook
    By Deepak -WFM in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-20-2013, 07:12 AM
  4. Inserting a hyperlink into an Outlook mail from Excel
    By Andrew-R in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2012, 10:00 AM
  5. How to format text when sending mail to Outlook?
    By efernandes67 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-14-2008, 11:18 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