How do I open document pages on the same SharePoint site and not on another web page?

Khushboo Kumari 97 Reputation points
2023-09-27T05:34:21.1133333+00:00

Hi,

I would like to know How do I open document pages on the same SharePoint site and not on another web page? For eg. the document which is inside the document library when I click on any document, it should be open in within the sharepoint site and does not redirect to any word pages. For reference, see the below attached images.

User's image

Thanks!

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,340 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,685 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,971 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
583 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,941 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Ling Zhou_MSFT 17,060 Reputation points Microsoft Vendor
    2023-09-27T07:05:54.89+00:00

    Hi @Khushboo Kumari

    Thank you for posting in this community.

    I am sorry that we have to open the office document in another web page. This is designed by SharePoint, and we can't change it. SharePoint is only for managing the document. For reading or editing office documents we rely on the apps in Microsoft 365(like Word, Excel etc.).

    User's image

    User's image

    Also, you can see that the document open URL includes Doc.aspx. which indicates that the Office file needs to be opened on this particular page and not on a SharePoint site page (That is why we will open the new page in another web page).

    User's image

    Also, I noticed that your second image gives away your domain name, please modify the image to encode the domain name for your safety.

    Please accept any inconvenience this may cause. Thank you for your kind understanding. If there is any other assistance I can provide, please feel free to let me know.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Ling Zhou_MSFT 17,060 Reputation points Microsoft Vendor
    2023-09-27T08:43:06.0866667+00:00

    Hi @Khushboo Kumari,

    I am afraid you are creating your knowledge base the wrong way. If you want to create large-scale knowledge bases, you can use the Enterprise wiki template to create a site collection. If you want to create a small-scale knowledge base, you can create a Wiki Page Library in team site. Either way you should create a Wiki Page to display the content from your original Word document rather than uploading the Word document to a website. That way you are viewing the knowledge as a site page rather than opening a Word document.

    User's image

    As you can see here, we won't open any other web pages, but we will display the SharePoint Site Page directly.

    image (2)

    You can refer this article to create your Knowledge Base.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Ling Zhou_MSFT 17,060 Reputation points Microsoft Vendor
    2023-09-28T08:39:38.4166667+00:00

    Hi @Khushboo Kumari,

    The only way to upload a document to SharePoint and open it as a document is to convert the document to an html file and then create a wiki page to display the html file.

    Here are the steps:

    First upload the HTML to SharePoint into a document library:

    1. Open Site Contents.
    2. Select Add an app.
    3. Select Document Library.
    4. Name the library.
    5. Click create.
    6. Open the library in a web browser e.g. https://sharepoint/sitecollection/sitename/reports/Forms/AllItems.aspx
    7. Upload the HTML files to this library.

    To display the HTML content on a SharePoint page:

    1. Open Site Contents.
    2. Open the Site Pages library.
    3. From the ribbon select Files > New Document > Wiki page.
    4. Give the page a name then click create.
    5. In the SharePoint page editor select Insert from the ribbon then Web Part then Media and Content category then Content Editor and Add.
    6. Click on the Script Editor box, then select Web Part then Web Part Properties from the ribbon.
    7. In the Content Link box click the ellipsis (...) and find the HTML file to display or paste in the full URL to the HTML file.
    8. Click OK to close the web page dialog.
    9. Click Save to save the page.

    The contents of the HTML file are now displayed on the SharePoint page. You'll need to create an apsx page in this manner for each static HTML page.

    But why would you want the uploaded file to open as a site page? You also run the risk of incorrectly converting document content by converting the document to webpage. I know you want to create a knowledge base, but if you want to show the knowledge in your document in a site page, a wiki page is a good choice. All you need to do is copy and paste the content of your document into the wiki page. In SharePoint only .apsx files can be opened as site pages.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.