![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Worked perferctly, BUT... It's ugly in the email, how do I clean it
up like an href type of link so that I can say maybe click this "link" to access the file. and the "link" have the file:/// reference hidden in it? Thanks.... Sub SendMessage() Dim objOutlook As Outlook.Application Dim objOutlookMsg As Outlook.MailItem Dim objOutlookRecip As Outlook.Recipient Dim strDirectory As String Dim strFileName As String strDirectory = "W:\purprod\public\Ellis\2008%20Tracking %20Tools\PPV%20POs%20Top%2010\" strFileName = "PPV%20Report%20Forward%20Looking%20" & Format(Date, "mm-dd-yy") & ".xls" ' Create the Outlook session. Set objOutlook = CreateObject("Outlook.Application") ' Create the message. Set objOutlookMsg = objOutlook.CreateItem(olMailItem) With objOutlookMsg ' Add the To recipient(s) to the message. Set objOutlookRecip = .Recipients.Add("Britton, Steve") objOutlookRecip.Type = olTo .Subject = "This is an Automation test with Microsoft Outlook" .Body = "This is the body of the message." & vbCrLf & vbCrLf & "file:///" & strDirectory & strFileName & "" End With |
Ads |
#2
|
|||
|
|||
![]()
To do that you need to use HTMLBody and not Body and to format your new text
correctly as HTML text using an A set of tags. Study some HTML messages that have text showing for an URL link and see how they do it. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "brittonsm" wrote in message ... Worked perferctly, BUT... It's ugly in the email, how do I clean it up like an href type of link so that I can say maybe click this "link" to access the file. and the "link" have the file:/// reference hidden in it? Thanks.... Sub SendMessage() Dim objOutlook As Outlook.Application Dim objOutlookMsg As Outlook.MailItem Dim objOutlookRecip As Outlook.Recipient Dim strDirectory As String Dim strFileName As String strDirectory = "W:\purprod\public\Ellis\2008%20Tracking %20Tools\PPV%20POs%20Top%2010\" strFileName = "PPV%20Report%20Forward%20Looking%20" & Format(Date, "mm-dd-yy") & ".xls" ' Create the Outlook session. Set objOutlook = CreateObject("Outlook.Application") ' Create the message. Set objOutlookMsg = objOutlook.CreateItem(olMailItem) With objOutlookMsg ' Add the To recipient(s) to the message. Set objOutlookRecip = .Recipients.Add("Britton, Steve") objOutlookRecip.Type = olTo .Subject = "This is an Automation test with Microsoft Outlook" .Body = "This is the body of the message." & vbCrLf & vbCrLf & "file:///" & strDirectory & strFileName & "" End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Link from Excel to Outlook ACT contacts file | TishyMouse | Outlook - Using Contacts | 1 | November 15th 07 02:37 PM |
Import/Export link not displayed in FILE | McCabe | Outlook - Using Contacts | 1 | July 2nd 07 08:33 PM |
Attached File link Dead | glamart | Outlook Express | 5 | April 19th 07 02:34 AM |
Getting Outlook to open OFT file from a web link? | darrel | Outlook - General Queries | 0 | October 2nd 06 09:46 PM |
What is the best way to clean up a .PST file (Outlook2003) - I've tried SCANPST.EXE... | ship | Outlook - General Queries | 6 | September 14th 06 06:57 AM |