I am using a VBA macro to populate the pages of a flashcard website.
In one of the text fields, I need to enter a URL. When I do this task manually, as soon as paste the URL in the field and press enter, the URL turns into a hyperlink. So when I review the flashcard later, I can click on the URL and open the relevant web page in another tab.
However when I use the following code to populate that field, the URL doesn't become a hyperlink, but remains text. Is there way I can ensure that the URL becomes a hyperlink?
Thank
In one of the text fields, I need to enter a URL. When I do this task manually, as soon as paste the URL in the field and press enter, the URL turns into a hyperlink. So when I review the flashcard later, I can click on the URL and open the relevant web page in another tab.
However when I use the following code to populate that field, the URL doesn't become a hyperlink, but remains text. Is there way I can ensure that the URL becomes a hyperlink?
Thank
VBA Code:
htmlDoc.getElementById("Front").innertext = String1
htmlDoc.getElementById("Back").innertext = "https://www.history.com/topics/china/genghis-khan"
htmlDoc.getElementById("GoNextcard").Click