![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Join Date: Apr 2003
Posts: 75
|
Hi all,
Anyone know how to email a shortcut to a file, I know attacting a whole file is fairly easy, but attaching a shortcut...? ta Wook |
|
|
|
|
|
#2 |
|
Join Date: Sep 2002
Location: Michigan
Posts: 1,132
|
Hello...I think this will do it...
Code:
P.S. This was taken directly from Outlook's help file...they give a list of all the different things you can link...
__________________
Using Windows XP with Office XP |
|
|
|
|
|
#3 |
|
Join Date: Sep 2002
Location: Michigan
Posts: 1,132
|
And after re-reading...did I mis-understand your question? You would just type the address as I've shown above into the body of the e-mail...did you want to do that through code?
Sorry if I mis-understood, Dave
__________________
Using Windows XP with Office XP |
|
|
|
|
|
#4 |
|
Join Date: Apr 2003
Posts: 75
|
Hi Davers, sorry for the late reply.
Sorry I don't think I explained myself very well. I need something like the below - which when run in excel creates a email and attaches a file. But instead of attaching a file I need to attach a shortcut file pointing to its location - actual file too big to email! Any thoughts? Set olookApp = CreateObject("Outlook.Application") Set mailnewmail = olookApp.CreateItem(olMailItem) Set myAttachment = mailnewmail.Attachments With mailnewmail .To = "Address" .Subject = ActiveWorkbook.Name .Display End With myAttachment.Add FilePath & "\" & FileName & ".xls" |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|