0

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 http://osgeo-org.1560.x6.nabble.com/Actions-HowTo-td4534256.html . 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?

1 Answer 1

2

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

3
  • thanks. I found that aand was just updating the question when you answered... I still have an issue with images though.
    – GeorgeC
    Commented Jun 13, 2013 at 6:39
  • Answer coming for that
    – Nathan W
    Commented Jun 13, 2013 at 6:39
  • Did you change you Type to Open like in my image. Not the name. I see yours has Generic
    – Nathan W
    Commented Jun 13, 2013 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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