Soyez le premier à donner votre avis sur cette source.
Snippet vu 36 139 fois - Téléchargée 9 fois
'utilise Windows Scripting Host Model 'autres propriétés accessibles: ' oShellLink.Hotkey (ex : = "CTRL+SHIFT+F") ' oShellLink.IconLocation (ex : = "notepad.exe, 0") ' oShellLink.Description (ex = "Raccourci classeur Excel") ' oShellLink.WorkingDirectory (ex = strDesktop) Sub CreerRaccourci(CheminCible) Set WSHShell = CreateObject("WScript.Shell") strDesktop = WSHShell.SpecialFolders("Desktop") Set oShellLink = WSHShell.CreateShortcut(strDesktop & "\ Raccourci classeur Excel.lnk") oShellLink.TargetPath = CheminCible oShellLink.Description = "Calcul Mental" oShellLink.WindowStyle = 1 oShellLink.Save End Sub 'Activer Sub TestRaccourci() 'On cherche le fichier CreerRaccourci (ActiveWorkbook.Path & "\" & " Raccourci classeur Excel " & ".xls") End Sub 'Supprimer Sub DeleteRaccourci() Set WSHShell = CreateObject("WScript.Shell") BureauPath = WSHShell.SpecialFolders("Desktop") 'pour supprimer un raccourci du bureau Kill (BureauPath & "\ Raccourci classeur Excel.lnk") End Sub
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.