1
Answer

copy a desktop shortcut to the office clipboard

Phil Saville

Phil Saville

15y
5.7k
1
I currently have an application which is used to replace all my old redundant links, however i want to be able to use my application to copy the shortcut to a file from the desktop to the office clipboard! I have tried the following code but it does not add the required shortcut to the clipboard, it comes back saying format not supported by clipboard. I would be grateful for any help and any sample code. Any questions please ask. My code is as follows:

System.Collections.Specialized.StringCollection files = new System.Collections.Specialized.StringCollection();
            files.Add(my file here);
            Clipboard.SetFileDropList(files);

Answers (1)