Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9132459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:18:51+00:00 2026-06-17T08:18:51+00:00

I have a document library in sharepoint storing a word document. If I click

  • 0

I have a document library in sharepoint storing a word document.

If I click on the link to the document I get a dialog box with “you want to open this file in readonly or editmode etc” and can open it in edit mode, change it, save it directly in word an the changes are saved in the document library.

The link to the file in the document library looks like this:

<a onfocus="OnLink(this)" 
   href="/test/DocLib2/wordtest.docx" 
   onmousedown="return VerifyHref(this,event,'1','SharePoint.OpenDocuments','')"     
   onclick="return DispEx(this,event,'TRUE','FALSE','FALSE',
            'SharePoint.OpenDocuments.3','1', 'SharePoint.OpenDocuments',
            '','','','1','0','0','0x7fffffffffffffff','','')"
>wordtest</a>

How do I create this link in my own web part where I have the name of the file and document library? Without just copying the above code, that wouldn’t be a good idea…

Is there some “official” method to achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:18:52+00:00Added an answer on June 17, 2026 at 8:18 am

    Unfortunately it doesn’t seem like there is a better option. But at least you can sort of figure out what the function definition is. The DispEx function is defined in the core.js file (but it’s easier to read in the core.debug.js). Both are in 14\Templates\Layouts\1033 directory.

    Here is the function definition:

    function DispEx(ele, objEvent, fTransformServiceOn, fShouldTransformExtension,
        fTransformHandleUrl, strHtmlTrProgId, iDefaultItemOpen, strProgId, strHtmlType, 
        strServerFileRedirect, strCheckoutUser, strCurrentUser, strRequireCheckout, 
        strCheckedoutTolocal, strPermmask)
    

    Here is my guess on what they mean. Please feel free to add comments to correct any mistakes or omissions:

    • ele – [obj] the element
    • objEvent – [obj] the event object
    • fTransformServiceOn – [bool] (unknown functionality) defaults to True
    • fShouldTransformExtension – [bool] (unknown functionality) defaults to False
    • fTransformHandleUrl – [bool] (unknown functionality) defaults to False
    • strHtmlTrProgId – [string] name of the ActiveXControl to try to load defaults to SharePoint.OpenDocuments.3
    • iDefaultItemOpen – [int] indicator of default to Edit or Read defaults to 1
    • strProgId – [string] name of the ActiveX Control
    • strHtmlType [string] (unknown functionality) defaults to empty
    • strServerFileRedirect – [string] (unknown functionality)
    • strCheckoutUser [string] the ID of the user who has checked out the document
    • strCurrentUser – [string] the ID of the current user
    • strRequireCheckout – [string] indicator whether to force a checkout
    • strCheckedoutTolocal – [string] indicator of whether to use the Local Drafts folder
    • strPermmask – [string] permissions mask for the current user defaults to 0x7fffffffffffffff

    There are clearly some inconsistencies in terms of using strings and integers to represent boolean values. It’s also strange that your code has 17 parameters but I can only find a function definition with 15 parameters, so I’m not sure what those last two empty strings are for. Some of that is the nature of JavaScript, but it also just looks sloppy on the part of Microsoft.

    This doesn’t really answer the question, hopefully it helps you or someone else.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a document library in SharePoint. When a new file is uploaded to
I have a document library with a PDF file. Whenever I click on the
So I have enabled Ratings in Sharepoint 2010 for a Document Library following this
On my SharePoint 2010 site I have a list of items (Document Library). This
I have a document library in SharePoint 2010. Is it possible to click an
I have a document file containing HTML markup. I want to assign the contents
Will the sharepoint document library support folder versioning? For example, I have a document
Possible Duplicate: Creating a custom Document Library in SharePoint I have 2 users, Martin
This is about folder level permissions. We have a document library with break inheritance.
This is my scenario: I need to copy files to a sharepoint document library

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.