I have an aspx page onto which I have added a page viewer web part to display a powerpoint file. I wanted to hide or remove the close button because closing returns to the library in which the file lives, which is not the desired behavior.

my first solution was to hide the close button using jquery using the following

 <script language="javascript">


as best as I can tell, this function is actually called before the page has rendered the page viewer web part, meaning that the html element of interest is not even on the page, which in turn would explain why the function does not do what I desire.

is there a way to trigger this function after the web part is rendered? or, is there a way to intercept the close event or its redirection so that I can send the user to the desired page?

perhaps there is a 3d way? I have tried html without success.

sharepoint 2013 sp1 enterprise farm.


there is actually a very clean solution to this problem.

on a web part page, add a page viewer web part and configure it for the required powerpoint file (page). click file share embed to get the necessary embedding code for the script editor web part. add a script editor web part then paste the embed code and save. you should see the pptx slide without the menu bar. users can download or export to pdf which is exactly what I wanted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.