I have an embedeed web part infopath form on my site. This form has 2 views I would like to add a button that changes the form's other view 1 prints only the webpart (not the entire page).

I have looked everywhere can't find anything to accomplish this. Best i have done so far is a button on the form to change to a different view and a button that prints the entire webpage.

1 Answer 1


What I used to do in such cases is to use JavaScript and hide unwanted page elements and call JavaScript window.print

You can use browser tools to locate the elements you want to hide and do something as below on the Print button click


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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