I didn't find a 'normal' way to do it, so I made a bash script do the job.
Well, here's the script:
#This script adds to launcher a specific document that the user has selected
#After specifying the document and its icon DO NOT remove them from their original position in your disk
#THE ICON SHOULD NOT HAVE SPACES IN ITS PATH AND TO BE A PNG FILE
# VALID PATH EXAMPLE:
# INVALID PATH EXAMPLE:
# /home/alex/Pictures/MY PICS/pic.png
document=$(zenity --file-selection --title="Select the document")
if [[ "$document" == "" ]]; then
exit #no document specified
icon=$(zenity --file-selection --title="Select an icon for it")
if [[ "$icon" == "" ]]; then
exit #no icon specified
desktop_name=$(echo $name | tr ' ' '_')
Categories=Utility;Application;" > ~/.local/share/applications/$desktop_name.desktop
echo "The file ~/.local/share/applications/$desktop_name.desktop has been created, pointing to $document"
To run the above script, copy and paste it into a file with Gedit, then save it as
add_document_to_launcher.sh, right click on it → Properties → Permissions → Check allow executing file as program. Then (preferred way is to) open a terminal and run the script through there or double click on the file and choose 'Run'.
A dialog will pop-up asking you for the document, then another will pop-up asking you for an icon for this document. Select any icon you like BUT: It has to be PNG and its path not to contain spaces.
After this, a file will be created under
~/.local/share/applications with the extension .desktop.
If you open the DASH and search your document with its filename, it will be shown under 'Applications' (and not under Files & Folders). You can simply drag and drop your document on the launcher! That's it :)
EDIT: remember: after this, do not remove the document from its path or the icon you have selected!