View Office documents in browser

Forums vLooup for SharePoint View Office documents in browser

This topic contains 1 reply, has 2 voices, and was last updated by  Alexander Bautz 1 year, 2 months ago.

  • Author
  • #18570

    Ivan Wilson

    Is it possible to configure vLookup running in Office 365 to display Microsoft Office files in the browser (new tab)? Currently they are downloading to the local computer

  • #18584

    Alexander Bautz

    You can add this code to the Custom JS in DFFS:

    function openWordAndExcelFilesInBrowser(a,item){
        var docName = item.get_item("FileLeafRef");
        var link = makeAbsUrl(item.get_item("FileDirRef") + "/" + docName);
    		case "docx":
    		case "xlsx":
    			a = "<a href='"+_spPageContextInfo.webServerRelativeUrl+"/_layouts/15/WopiFrame.aspx?sourcedoc={A9149557-15AB-49B6-8294-AAC3C0C3FE7A}&file="+docName+"&action=default' target='_blank'>"+docName+"</a>";
    	return a;

    You must change “{A9149557-15AB-49B6-8294-AAC3C0C3FE7A}” with the GUID of the document library where the documents are located.

    Then use this in the “Special configuration” for the field “FileLeafRef” in the viewfields section in vLookup config:


    Let me know how this works out.


You must be logged in to reply to this topic.