Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all
Is it possible to have the activeworkbook when it saves for the very first time to automatically put a shortcut onto the desktop? I can work out how to have the code activate for the first time, just not how to get a shortcut to the desktop Thanks Greg |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Greg,
I can work out how to have the code activate for the first time, just not how to get a shortcut to the desktop Try: '============= Public Sub Tester() Dim WSH As Object Dim MyShortCut As Object Dim destPath As String Dim srcPath As String srcPath = ThisWorkbook.FullName Set WSH = CreateObject("WScript.Shell") destPath = WSH.SpecialFolders.Item("Desktop") Set MyShortCut = WSH.CreateShortcut(destPath & "\Test.lnk") With MyShortCut .TargetPath = srcPath .Save End With Set WSH = Nothing End Sub '<<============= --- Regards, Norman "Greg" wrote in message ... Hi all Is it possible to have the activeworkbook when it saves for the very first time to automatically put a shortcut onto the desktop? I can work out how to have the code activate for the first time, just not how to get a shortcut to the desktop Thanks Greg |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Norman Exactly what I was hoping for
Greg "Norman Jones" wrote in message ... Hi Greg, I can work out how to have the code activate for the first time, just not how to get a shortcut to the desktop Try: '============= Public Sub Tester() Dim WSH As Object Dim MyShortCut As Object Dim destPath As String Dim srcPath As String srcPath = ThisWorkbook.FullName Set WSH = CreateObject("WScript.Shell") destPath = WSH.SpecialFolders.Item("Desktop") Set MyShortCut = WSH.CreateShortcut(destPath & "\Test.lnk") With MyShortCut .TargetPath = srcPath .Save End With Set WSH = Nothing End Sub '<<============= --- Regards, Norman "Greg" wrote in message ... Hi all Is it possible to have the activeworkbook when it saves for the very first time to automatically put a shortcut onto the desktop? I can work out how to have the code activate for the first time, just not how to get a shortcut to the desktop Thanks Greg |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Norman Jones Wrote: Hi Greg, I can work out how to have the code activate for the first time, jus not how to get a shortcut to the desktop Try: '============= Public Sub Tester() Dim WSH As Object Dim MyShortCut As Object Dim destPath As String Dim srcPath As String srcPath = ThisWorkbook.FullName Set WSH = CreateObject("WScript.Shell") destPath = WSH.SpecialFolders.Item("Desktop") Set MyShortCut = WSH.CreateShortcut(destPath & "\Test.lnk") With MyShortCut .TargetPath = srcPath .Save End With Set WSH = Nothing End Sub '<<============= --- Regards, Norman Hi Norman, For me, this code does not create a shortcut on the desktop, bu instead he C:\Documents and Settings\Owner\Applicatio Data\Microsoft\Office\Recent Why is that -- Desert Piranh ----------------------------------------------------------------------- Desert Piranha's Profile: http://www.excelforum.com/member.php...fo&userid=2893 View this thread: http://www.excelforum.com/showthread.php?threadid=55314 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Desktop Shortcut | New Users to Excel | |||
how can i get office shortcut bar on the desktop? | Excel Discussion (Misc queries) | |||
Place Shortcut On Desktop | Excel Programming | |||
Sending a shortcut to the desktop | Excel Discussion (Misc queries) | |||
Desktop Shortcut | Excel Programming |