LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add Hyperlink to an Email

Solved!
Go to solution

I am trying to add a hyperlink to a local document (Excel file) in the body of an email.  I'm using "SMTP Email Send Message.vi" and have tried wiring several different string formats to the body attempting to attach a hyperlink and have had no luck.

 

Any ideas?  I have the Report Generation Toolkit but do not have the Internet Toolkit.

 

Thanks very much,

 

Mark

0 Kudos
Message 1 of 6
(3,417 Views)
Nevermind -- figured it out! 
0 Kudos
Message 2 of 6
(3,413 Views)
Then please tell us what the answer was.  That way if someone searches the forums with the same question, you will be able to help them with your answer.
Message 3 of 6
(3,394 Views)
Solution
Accepted by topic author MITAeroBike

By inserting file:/// before the file name, a linkable local link was created.  When read by Outlook/email program this appears as a link.

 

i.e. "file:///C:\Documents and Settings\user\excelsheet.xls" would link to the Excel sheet.  This works for local files.

 

Mark

Message 4 of 6
(3,364 Views)

Firstly, I know this is an old thread, but as RavensFan said, "...if someone searches the forums with the same question, you will be able to help them with your answer...".

 

And I did search, and it did help. But there is something to add to this.

 

MITAeroBike's solution, as written, doesn't quite work as intended.

 

The spaces in the file path need to be replaced with %20 to work correctly, which is easily done with a Search and Replace Pattern vi.

Search and Replace Pattern.png

 

 

Message 5 of 6
(2,868 Views)

If you use Microsoft Outlook, I've used this techinque before:

 

http://www.dotnetmafia.com/blogs/coryrobinson/archive/2007/11/08/how-to-make-unc-paths-with-spaces-l...

 

 

No need to prefix with file:// or replace spaces with %20

 

Example email sent from my LabVIEW app using the Internet Toolkit:

 

Recent SWORDS report file not found.


Reminder to be sent in 24 h

 

Download report from: <https://enpec2.emerson.com/SwordsPhase2/index.jsp>

 

Save file to: <\\netapp1\shared\Manufacturing\Test Engineering\Log Files\>

 

Please do not respond to this email
This account is NOT Monitored.

 

 

In Outlook, the UNC is clickable.

 

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

Message 6 of 6
(2,861 Views)