jcwiatr
asked on
Include Hyperlink in email sent from vbscript
When a task is created in a folder, I am trying to send an email and include a hyperlink to the EntryID of a task just created. When an internal user receives the email, I want them to click the hyperlink which will take them to the task in a public folder. I have the following code in the item_close() event within an custom outlook forms vbscript:
Set NewItem = Application.CreateItem(0)
NewItem.To = "support@xyzi.com"
NewItem.Recipients.Resolve All
NewItem.Subject = "Item# " & Item.UserProperties("Item" )
NewItem.Body = "<Outlook:" & Item.EntryID & ">" & vbCrLf
NewItem.Send
However, when the email is received the hyperlink is not underlined... it just appears as normal text within the email body.
Points based on urgency.. Thank-you.
Set NewItem = Application.CreateItem(0)
NewItem.To = "support@xyzi.com"
NewItem.Recipients.Resolve
NewItem.Subject = "Item# " & Item.UserProperties("Item"
NewItem.Body = "<Outlook:" & Item.EntryID & ">" & vbCrLf
NewItem.Send
However, when the email is received the hyperlink is not underlined... it just appears as normal text within the email body.
Points based on urgency.. Thank-you.
If not, what is Item.EntryID equal to? Does it include the preceding \\
ASKER
Hello. The EntryID does not contain the \\ so I added this in also so the final result is - but it is still not hyperlinked.
<Outlook:\\000000001A44739 0AA6611CD9 BC800AA002 FC45A09007 610CC3098D 5C448B5668 9C934BC94C 700000016C E130000761 0CC3098D5C 448B56689C 934BC94C70 00000171DB B0000>
I guess the question also is, how is the done manually if I was constructing and email manually.... maybe then I can apply the same syntax to the vbscript.
<Outlook:\\000000001A44739
I guess the question also is, how is the done manually if I was constructing and email manually.... maybe then I can apply the same syntax to the vbscript.
Oh - no, you won't need the \\ there...
I'm not very familiar with the method you're using, but I did find this (http://support.microsoft.com/kb/293152) which details using the GetItemFromID function - perhaps that will help?
I'm not very familiar with the method you're using, but I did find this (http://support.microsoft.com/kb/293152) which details using the GetItemFromID function - perhaps that will help?
ASKER
Hi sirBounty... I have tried without the // as well.
I can access the ID OK... my issue is adding it to an email as a hyperlink within VBSCRIPT.
I can access the ID OK... my issue is adding it to an email as a hyperlink within VBSCRIPT.
Hmm - I wonder if this is possible? Doesn't that point to a specific Outlook session id?
ASKER
not sure about that. I hope it is possible :)
You're trying to point another user to a task on your system using this link, correct?
ASKER
the task is in a public folder. Juls
Sorry...I'm not the Outlook guru on this matter.
I've not gotten session IDs to load as hyperlinks before...not really sure you can, but I can't say for %100. Hopefully someone with more knowledge in it will be by shortly...
I've not gotten session IDs to load as hyperlinks before...not really sure you can, but I can't say for %100. Hopefully someone with more knowledge in it will be by shortly...
ASKER
Thanks anyway. appreciate your time.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just the 'someone' I was thinkin of...howdy neighbor. :^)
ASKER
Final solution: Used the following syntax.
NewItem.HTMLBody = "<a href=" & chr(34) & "outlook:" & Item.EntryID & chr(34) & ">Text</a>" & vbCrLf
Thank-you both for you efforts.
Cheers.
NewItem.HTMLBody = "<a href=" & chr(34) & "outlook:" & Item.EntryID & chr(34) & ">Text</a>" & vbCrLf
Thank-you both for you efforts.
Cheers.
Hi, SB! How's everything going? I'm struggling a bit with the new site and the loss of QP.
jcwiatr, I'm glad we could help out.
jcwiatr, I'm glad we could help out.
:^) Hi Blue...you're not the only one!
Now instead of QP and nicely answered questions, we get spammed! :'(
I detest this new method of participating...not sure how much longer I can take it! Haha
Now instead of QP and nicely answered questions, we get spammed! :'(
I detest this new method of participating...not sure how much longer I can take it! Haha
I'm definitely not a fan of the new site. My participation is way down. I'm hoping that someone puts something like QP together. I know there are a couple of efforts to do that, so maybe we'll get some relief before too long. The price of progress, I suppose.
NewItem.Body = "<Outlook:" & chr(34) & Item.EntryID & chr(34) & ">" & vbCrLf