Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to create hotlinks to open excel and image files but am having issues.

I fixed the issue with opening excel files by adding ""

cmd /c start excel.exe /r  "[% "Excel" %]"

However I can't get images to open??? rather than opening a specific program can qgis just open a file with the default system viewer?

cmd /c start rundll32 "C:\Program Files\Windows Photo Viewer\PhotoViewer.dll" "[% "Location" %]"

I tried a few option with rundll32.exe C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen %1 but they don't work.

Also tried enter image description here as per Answer from Nathan but I get "Unable to run command"

=== Original post follows.

I have looked at Adding a hotlink to an attribute field in QGIS and . The code from here launches excel but can't find the file...

I have the following in the properties-actions enter image description here

when I try to open it I get enter image description here It looks like the issue is with the spaces in the directory name...

P:\2013\361_xxx_Production\Input\Supply1\28-05-xxx_Application_Packages\Roads photos and form 2s\Roads Package 4\Form 2 Output xxx Roads Package 4.xls

it seems to be getting truncated at the first space in the directory. It is bad datastructure but I can't change this. Is there any way to fix this issue?

share|improve this question
up vote 2 down vote accepted

Try wrapping the expression in quotes:

cmd /c start excel.exe /r "[% "Excel" %]"

You can just use the Open action type

enter image description here

share|improve this answer
thanks. I found that aand was just updating the question when you answered... I still have an issue with images though. – GeorgeC Jun 13 '13 at 6:39
Answer coming for that – Nathan W Jun 13 '13 at 6:39 didn't work. – GeorgeC Jun 13 '13 at 7:00
Did you change you Type to Open like in my image. Not the name. I see yours has Generic – Nathan W Jun 13 '13 at 7:04
Worked. Thanks for your time. – GeorgeC Jun 13 '13 at 23:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.