Forum Discussion

Abbyamante's avatar
Abbyamante
Brass Contributor
Nov 14, 2024

Copy text to clipboard Button in Sharepoint Site Page

Hello Experts!

I'm wondering if this is something that can be achieve in the Sharepoint site homepage.

I wanted to create a button that can copy the button values to the clipboard. 

Im thinking of using the button or Call to action web part in sharepoint site then when the user click the button it will copy the button values to the clipboard and they can paste the value anywhere the user is required to.

 

Is this possible to achieve?

  • Hello! i was able to figure it out. I got the idea that was mentioned here Copy field button sharepoint list

    and this is how i implement:

    1. on Sharepoint page i used a button web part
    2. on the button link i used this = https://sancarn.github.io/copy-to-clipboard/index.html?copy=addthevalueyouwanttocopy
    3. then save the and republish the page. when clicking the button to copy, this will open another tab and will close automatically after a few seconds
  • Rob_Elliott's avatar
    Rob_Elliott
    Bronze Contributor

    There is no way to do this out-of-the box. And neither the Power Apps copy() function nor Power Automate support it.

  • Abbyamante's avatar
    Abbyamante
    Brass Contributor

    Hello! i was able to figure it out. I got the idea that was mentioned here Copy field button sharepoint list

    and this is how i implement:

    1. on Sharepoint page i used a button web part
    2. on the button link i used this = https://sancarn.github.io/copy-to-clipboard/index.html?copy=addthevalueyouwanttocopy
    3. then save the and republish the page. when clicking the button to copy, this will open another tab and will close automatically after a few seconds

Resources