Share via

Closing a SharePoint website document without this leading to the SharePoint folder.

Anonymous
2024-07-31T15:01:54+00:00

Hello,

I have created a new SharePoint site which can be viewed by anyone within the organisation. The site contains several links to PDF documents which currently open in the same tab. When you click the X to close the PDF, it takes the user to the Team SharePoint folder in which the original document is stored and not to the SharePoint site.

Is there a way to make links open in a new tab and/or return the user to the original SharePoint page, rather than taking them to our Teams folder?

Each PDF does have a 'back' function, but the X is more prominent and is being used more regularly, which is leading users away from the page (and then them having to search the link again) and to a folder they don't need to access.

Many thanks.

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

10 answers

Sort by: Most helpful
  1. matt howell 3,511 Reputation points
    2025-02-26T16:50:47+00:00

    This has been complained about for years (maybe decades) but never fixed by Msft. On what planet would a user prefer to be redirected to the library containing the document they clicked a link to? Makes ZERO sense and yet Msft disabled the classic workaround ( ?source=redirecturl redirect function) without providing an alternative.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-11-07T00:57:54+00:00

    I have the same question, but I added the link via Quicklinks and have clicked the box to "Open in new tab". However, if users click the close button/X in the upper right corner of the browser pdf preview, it goes back to the document library. I want people to be forced to either close the tab or when they close out of the document they are returned to the previous url.

    Is there a way to make that happen?

    If not, is there a way to force documents to open in desktop apps instead of the web preview?

    Thanks

    Krysten

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2024-08-04T00:36:10+00:00

    Hi Amy,

    Thanks for posting back.

    According to your reply, I suggest you view the following points.

    1. I would like to know if the steps you took to copy the link were like this.

    In Teams, click the three dots of the PDF file, Details, under More details, click the Copy button of Path. Please note that this is a direct link to the file, allowing users who already have access to view the file through the link.

    If you want all internal users to be able to view the PDF file, you will need to use a sharing link. Click the three dots of the PDF file, Share, in the dialog, click the Gear icon of "Copy link", set "People in your tenant", Apply, and then click "Copy link".

    ![](https://learn-attachment.microsoft.com/api/attachments/070c61f5-bb1a-42d2-a594-bd12d67a3e36?platform=QnA"2">

  4. Regarding your second question, it is normal behavior that clicking an image in the Image web part will refresh the current page. There is no out-of-box feature/option to change this behavior in the Image web part. In this case, as a workaround, you can choose to use another web part that supports the new tab, like the Quick Links web part, Or you can ask users to change the way they click on the image, such as holding down "Ctrl" and click the image or clicking on the mouse wheel, or right-clicking the image and selecting "Open link in new tab". All of these methods are provided by the browser.

Also, based on my search, here is a thread where members discussed similar needs. I suggest you try the workaround in Time Tracker's reply and check if it works on your end. Some users mentioned that this workaround worked for them. However, it doesn't work with me.

We look forward to your response. Thanks for your cooperation.

Sincerely,

George | Microsoft Community Moderator

Was this answer helpful?

0 comments No comments
  • Anonymous
    2024-08-01T08:25:02+00:00

    Hi George,

    Thank you for your help.

    I have copied the link from our Team folder and copied this as a link to the SharePoint site.

    I haven't used any quick links. The majority of links have been added to an Image - For a bit of context, the PDF files are for 'career stories', so our SharePoint site has a picture or the author (or similar) and when a viewer clicks on the photo, the PDF document loads.

    At present the document is loading in the same tab, but upon closing it (clicking the 'X' rather than 'back'), the page refreshes and takes the user our Teams folder where the original document is stored.

    I have added an example screenshot which hopefully makes more sense!

    Thank you

    Amy

    Was this answer helpful?

    0 comments No comments
  • Anonymous
    2024-07-31T17:18:56+00:00

    Hi Amy,

    Thanks for posting in the community. We are happy to help you.

    Per your description, these PDF files are stored on another team site. I would like to know how you added the PDF file's URL to the new site. Did you add the URL into a web part on the page, such as the Quick Links web part? Or did you create a Link file in the library and add the URL to it? Please provide more details about the situation.

    Based on my test, some web parts support opening the link/file in a new browser tab. Also, clicking the Link file in the library also opens the link in a new browser tab.

    We look forward to your response. Thanks for your cooperation.

    Sincerely, 

    George | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments