I want to able to add a button on the EnterpriseWiki.aspx page with a certain javascript code that opens Outlook and has the wiki page ( the aspx file ) in attachment so users can easely share content trough email. I allready have a button that prints the entiry page so I assume it is possible to have a similar one to email the aspx file.

Thanks !


  • What SharePoint version are you using (2007, 2010, 2013)? – TempaC May 27 '13 at 8:14
  • i'm using the 2013 SharePoint server version . – Vandoorn Kevin May 27 '13 at 8:15
  • Perhaps this link will help you craft the script: stackoverflow.com/questions/271171/…. Using the "document.getElementById('myText').value" might fetch you the page if you know the right Id. – TempaC May 27 '13 at 8:21
  • 1
    done it like this : document.all.item('div_mail').innerHTML – Vandoorn Kevin May 27 '13 at 11:26

You need a combination of mailto and the current URL which you should be able to get from document.URL using JS.

| improve this answer | |
  • I don't want to email the link of the page I want to email the content of the page as attachment or add the content of my page to my email I've solved it like this at the moment : function sendMail() { var link = "mailto:someone@b-inside.be" + "?cc=myCCaddress@example.com" + "&subject=" + escape("KB Artikel :") + "&body=" + escape(document.all.item('div_mail').innerHTML) ; window.location.href = link; } – Vandoorn Kevin May 27 '13 at 11:23
  • and put the content of the page between div id ="div_mail" tags – Vandoorn Kevin May 27 '13 at 11:24
  • Ah I see. Good luck – Dave Paylor May 27 '13 at 11:37

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.