A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Clean up File Link



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 7th 08, 08:14 PM posted to microsoft.public.outlook.program_vba
brittonsm
external usenet poster
 
Posts: 4
Default Clean up File Link

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  
Old November 10th 08, 02:11 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Clean up File Link

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 07:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.