• Delete shortcut by code (Access 2000)

    Author
    Topic
    #430279

    How can i delete with code a shortcut on the desktop? Since th desktop has different names in the different computers,is there any way to refer to the desktop and delete the link there?
    For example the following code below is not valid :
    DoCmd.DeleteObject acLink, “MyLibrary (2).lnk”

    Viewing 0 reply threads
    Author
    Replies
    • #1004274

      DeleteObject can only delete database objects (tables, queries, forms etc.) within the current database. It is not meant to delete files. You can use

      Kill “path+filename”

      to delete a file. Of course, you must substitute the correct path and filename. You already know how to refer to the desktop, see for example post 562,210.

    Viewing 0 reply threads
    Reply To: Delete shortcut by code (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: