How to open file with its application?

erp-technicalerp-technical Member Posts: 7
Hi,

I am in need to open a file and show it to user. File may be in server (Disk) and file path will be stored in Navision database. ](*,)

I want to open the file (Word,Excel or Pdf) from Navision code irrespective of type of file.

(It may be same as Shortcuts in Navision 4.0)

Can anybody help me?

Thanks in Advance

Siva

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Remember: Search is your friend

    See thread http://www.mibuso.com/forum/viewtopic.php?t=8658 where following solution can be found:
    gandrius wrote:
    I suggest to use Automation instead of function HYPERLINK()

    ShellExt Automation 'Microsoft Shell Controls And Automation'.Shell

    and then enough to write few lines of code


    CREATE(ShellExt);
    ShellExt.Open("File Name");
    CLEAR(ShellExt);
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • krikikriki Member, Moderator Posts: 9,110
    It is not necessary to use an automation.
    You can also use HYPERLINK.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    HYPERLINK does not support all filetypes :(
  • krikikriki Member, Moderator Posts: 9,110
    HYPERLINK does not support all filetypes :(
    Some examples of which filetypes it doesn't support?
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    I think it was this

    http://www.microsoft.com/Businesssoluti ... ttings.xml

    But I remember reading more but I cannot find it anymore :cry:
  • garakgarak Member Posts: 3,263
    There are many Ways ....

    the simplest

    hyperlink(Directory + Document) ->

    hyperlink('C:\Temp\' + '123.doc');

    Tis starts the standard application for the fileexten. *.doc

    Regards
    Do you make it right, it works too!
  • erp-technicalerp-technical Member Posts: 7
    =D>

    Thanks alot for all who joined to give the solution

    Siva
  • Ravi_ThakkarRavi_Thakkar Member Posts: 392
    Hi all,

    I have one problem.
    I want to create one command button 'Open File'.
    When I click on that it should display the attachment directly without exporting it to hdd.

    Can i do the same? if yes then how? I dont have the file path. i have only File name, file size, file data, content type.

    Please help me out
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
  • krikikriki Member, Moderator Posts: 9,110
    Create a file in the tempdirectory, write the info to it and then use HYPERLINK to run it.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.