Email from excel using VBA - with changing hyperlink in body

Hitzp2912

New Member
Joined
Dec 23, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi All,

Hoping someone can help. I have set up to email a list of estate agents saying hello, including some performance data and sharing a link to a login page to a platform they use.... this has been done using vba.

However I would also like to send an email to clients. However for the clients to login they need to reset their passwords.

I would like to be able to insert their unique "activation code" as a hyperlink in the body of the email which would take them to the reset password page unique to them.

Id like to do this via the same list as i can lookup the activation codes for clients next to their name in excel.

Hope I have explained this clearly..

Any thoughts?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Use .HTMLBody and then something like:

VBA Code:
.HTMLBody = "<a href='www.google.com?activationCode=" & sheets("Codes").range("A1").value & "'>Click here to activate your account</a>"
of course instead of Range("A1").value you will put value of particular code (from list).
 
Upvote 0
Use .HTMLBody and then something like:

VBA Code:
.HTMLBody = "<a href='www.google.com?activationCode=" & sheets("Codes").range("A1").value & "'>Click here to activate your account</a>"
of course instead of Range("A1").value you will put value of particular code (from list).
Thanks Kokosek.

However i fear i may not have explained properly... so the Activation Code would be a hyperlink itself as it takes the recipient to their own unique page.

I need a way to get each users hyperlink into the email body.

If im not mistaken the above would take everyone to the same webpage ... but would show them their activation code?
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top