I have a question concerning Outlook.
I have a script that creates a new email in outlook with a standardized text.
This text contains some hyperlinks and I want to send this text as a clickable hyperlink, rather than as plain text.
This is my code so far:
Code: Select all
^#y::
Outlook := ComObjActive("Outlook.Application")
email := Outlook.Application.CreateItem(0)
email.To := emailadres
email.Sender := test@test.nl
email.Subject := "email subject"
myInspector := email.GetInspector, myInspector.Activate
Run,OutlookError.ahk ; an error is generated concerning safety issues in outlook is clicked away with this ahk file
wdDoc := myInspector.WordEditor
wdRange := wdDoc.Range(0, wdDoc.Characters.Count)
wdRange.InsertBefore(email "body text of the email, http`://www.google.nl")
return
I can move the caret to the link and press space and a hyperlink is created.
Looking online it looks as if I can add a link using html <a href="www.google.nl"> LINK TEXT </a>, however when I add this to the script is doesn't work.
Code: Select all
wdRange.InsertBefore(email "body text of the email" & "<a href=""www.google.nl"">link</a>")
Do you have any suggestions how I can create an email with clickable hyperlinks that also maintains the standard Outlook signature?
Thanks in advance for your help,
Best,
Justin