Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Autogenerated email with hyperlink

Posted on 2004-04-16
12
1,684 Views
Last Modified: 2008-12-17
I have an autogenerated email that is sent when a field is checked. This is the message:

                        AlertMessage1.To = Email1                        
                        AlertMessage1.Subject = "Pending Account Approval: " & AlertSubject
                        AlertMessage1.FlagStatus = 2
                        AlertMessage1.FlagDueBy = Due
                        AlertMessage1.Body = "A new account request has been made. " & _
                              "The account is for " & FirstName & " " & LastName & ", starting " & StartDate & chr(13) & _
                              "Please check the ACCOUNT REQUESTS - SUBMITTED folder in the Public Folders. " & _
                              "This can be found at G.\1.\a. or by clicking HERE" & chr(13) & chr(13) & _
                              "NOTE: No action will be taken on the account till it is approved." & chr(13) & chr(13) & _
                              "(THIS WAS AN AUTO GENERATED EMAIL)"
                        AlertMessage1.Send


How can i turn this line into a hyperlink to the outlook folder?

"This can be found at G.\1.\a. or by clicking HERE" & chr(13) & chr(13) & _

I know you can hyperlink to outlook folders with "outlook//folder location".  I just cant figure out how to hard code the url to the "HERE" text.
0
Comment
Question by:noodleNT
  • 7
  • 4
12 Comments
 
LVL 7

Expert Comment

by:rosesolutions1
ID: 10847347
Preceed with the relevent internet protocol identifier - ie. http:// for www, or in your case file:// for stuff on the file system. (Other options include Outlook:// for stuff in Outlook, ftp://, mailto:, gopher://, news:, nntp:// and telnet://)
0
 

Author Comment

by:noodleNT
ID: 10847417
"I just cant figure out how to hard code the url to the "HERE" text."

I know that stuff. I need to code it similar to this:
[url=outlook://Public Folders/Departments/Subfolder/subfolder]HERE[/url]

I have tried that and href html url code  with no luck, I just get that string and not the HERE link.
0
 
LVL 7

Expert Comment

by:rosesolutions1
ID: 10847496
oh! - set bodyformat property to the one for html - then your stuff will work.
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Author Comment

by:noodleNT
ID: 10847710
Do i use standard HTML link code or the style above?
0
 

Author Comment

by:noodleNT
ID: 10847760
Does not work:

      HERE1 = "[url=outlook://Public Folders/Departments/Subfolder/subfolder]HERE[/url]"
0
 

Author Comment

by:noodleNT
ID: 10847763
Might help if you see how I call it in the body. I have changed the bodyformat from richtext to HTML per your response.

"This can be found at G.\1.\a. or by clicking " & HERE1 & chr(13) & chr(13) & _
0
 
LVL 7

Expert Comment

by:rosesolutions1
ID: 10848556
Ooops - my richtext vs HTML seems to be furphy (ie red herring) (ie irrelevent)  OK - I now see the problem - we are finally on the same wave length! AFAIK Outlook does not have UI (or code) to create a link that displays something other than the actual link address - I have tried a few times.

You can do this manually - create the hyperlink in Word (including both the visible text and the actual link), and copy it into an outlook message - it works just fine. (well, it wont work in your unsent message, but if you send it to yourself, you will see that the link works as desired). [I tested in W2003/OL2003.]

I suggest you use the Word object model to create the link and then use the clipboard to bring it over to Outlook - that plausible for you? Otherwise, let it display the actual link address as in "This can be found at outlook://Public Folders/Departments/Subfolder/subfolder" which they can either click on or navigate to seperately.
0
 

Author Comment

by:noodleNT
ID: 10850086
Let me see if I understand your replay.

The only way to send a hyperlink is to create a normail richtext\HTML emal (which I do all the time for personal emails). It cannot be added to the VB form code in the message body of the auto email alert function?
0
 
LVL 13

Accepted Solution

by:
stefri earned 100 total points
ID: 10850792
If you want to use the Outlook protocol to access let us say a Public folder:
1) your mail must be in plain text (otherwise Internet Explorer does not understand outlook:// if you use HTML format)
2)Use angle brackets such as in: <outlook://Public Folders/All Public Folders!myFolder/~thisItemToOpen> as there are spaces in the link
3)The link has to be visible as you cant use HTML coding which displays somthing with an hyperlink you do not see

So your code could be:

                    AlertMessage1.To = Email1                    
                    AlertMessage1.Subject = "Pending Account Approval: " & AlertSubject
                    AlertMessage1.FlagStatus = 2
                    AlertMessage1.FlagDueBy = Due
                    AlertMessage1.Body = "A new account request has been made. " & _
                         "The account is for " & FirstName & " " & LastName & ", starting " & StartDate & chr(13) & _
                         "Please check the ACCOUNT REQUESTS - SUBMITTED folder in the Public Folders. " & _
                         "This can be found at G.\1.\a. or by clicking this link <outlook://Public Folders/All Public Folders!myFolder/~thisItemToOpen>" & chr(13) & chr(13) & _
                         "NOTE: No action will be taken on the account till it is approved." & chr(13) & chr(13) & _
                         "(THIS WAS AN AUTO GENERATED EMAIL)"
                    AlertMessage1.Send


Stefri
0
 
LVL 7

Expert Comment

by:rosesolutions1
ID: 10851829
If you want to display HERE, and have the link be something else (outlook://...) my recomendation is to create the link in WORD and then move it into the message. According to my testing, this will work with any email format (ie. html, rtf, or plain text). Outlook seems to understand such a link, but not have any way to create it. Word, on the other hand, can create it.
0
 

Author Comment

by:noodleNT
ID: 10852035
Rose.... Did you copy it into a new message or into the VB code?

Your responces make me think you are just creating links in a standard email message by clicking the New Message button in Outlook. Which no where close to what I am trying to do. Maybe if you post the code it would help me understand your solution.

Right now I will have to say stefri has the closest working response. I would be great if I could link it to HERE instead of having the long folder link location but that option doesn't look to be available. Yes... I know you clan create links with standard email message body but it looks like you do not get this type of control in a VB side email body.

Stefri Gets the points.... Plus fifty for the direct a quick reply. Thanks!
0
 

Author Comment

by:noodleNT
ID: 10889977
Update:

If you use a template you can get the Hyperlinks to work correctly with a CLICK HERE text. Check out this solution for more info:

http://www.experts-exchange.com/Applications/MS_Office/Outlook/Q_20960714.html
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question