I want to add a hyperlink to an email where I point to a folder under "AppData". As user names obviously differ from system to system, I'd like to use the variable "Userprofile" (which typically is: C:\Users\UserId\, with "UserID" the name of the account logged on).
As I think I should use "%" around the variable, I now have something like this in the dialog box of the hyperlink-edit (that box converted my % to %25; which I understand): %25UserProfile%25/AppData/Local/Microsoft
This does not work however... where am I going wrong?
Link using %UserProfile%
-
- BronzeLounger
- Posts: 1287
- Joined: 03 Feb 2010, 19:59
- Location: Terneuzen, the Netherlands
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Link using %UserProfile%
See this reply in the Office TechCenter
Seems the trick is to hyperlink to a batch file that will open the userprofile window.
Seems the trick is to hyperlink to a batch file that will open the userprofile window.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- Administrator
- Posts: 78788
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Link using %UserProfile%
If it worked, it would be even easier to use the environment variable LOCALAPPDATA, which points to C:\Users\<username>\AppData\Local. But, unfortunately, as you have found, it doesn't work. The file:/// protocol that is used for linking to local files can't handle environment variables.
Similar questions have been asked on other forums, and the consensus appears to be that it is impossible.
@Rudi: if you send someone an e-mail, it is unlikely that you can refer to a batch file...
Similar questions have been asked on other forums, and the consensus appears to be that it is impossible.
@Rudi: if you send someone an e-mail, it is unlikely that you can refer to a batch file...
Best wishes,
Hans
Hans
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Link using %UserProfile%
The article refers to saving the batch file on a shared drive:
Of course this will only work in a network environment. Maybe ErikJan can use this if the case is true?"Share the .bat file on a network share so the recipients could reach it."
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- Administrator
- Posts: 78788
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- BronzeLounger
- Posts: 1287
- Joined: 03 Feb 2010, 19:59
- Location: Terneuzen, the Netherlands
Re: Link using %UserProfile%
Rudi, Hans, thanks for the help. I'll probably write <User> and explain what I mean ;-)