ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Possible to delete or edit a desktop shortcut? (https://www.excelbanter.com/excel-programming/271982-possible-delete-edit-desktop-shortcut.html)

Marchand Durpis

Possible to delete or edit a desktop shortcut?
 
Is there any way in VBA to either totally delete a desktop shortcut,
or to edit the TargetPath of an existing one? I'd like to distribute
an update to an XLS file for which many users already have a shortcut
on their desktop (They haven't put the file on their desktop, just a
shortcut to it). The update will have a different file name than the
existing one. I prefer not to confuse the users by having either
having two almost-the-same icons on their desktop. Nor do I want to
force them to manually delete the existing one and create a "new" one
pointing to the updated file.
So while there's a bunch of code out there - and in this newsgroup -
on how to create a desktop shortcut, I haven't seen any that let's you
find whether a specific shortcut already exists and change its
..TargetPath, or to simply delete it (after which I'd create a totally
new, but visually identical one).
Anyone out there ever done this kind of thing before?

/Marchand/


All times are GMT +1. The time now is 10:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com