2

When you copy text from a webpage in firefox (a non microsoft product) into OneNote it adds the url of the webpage along with the copied text as "Pasted from" as in the following example:

Apache OpenOffice is an open-source office productivity software suite 

Pasted from <http://en.wikipedia.org/wiki/Openoffice> 

How OneNote access the url info of the copied text from a non microsoft app. How can I access similar information programmatically in my apps using c++/C# or other technologies? Is there some api to access additional information from system clipboard like url, source application, source file etc?

timmaktu
  • 163
  • 1
  • 1
  • 12
  • The clipboard itself is "global" to the user and can be observed for changes, see http://stackoverflow.com/questions/2226920/how-to-monitor-clipboard-content-changes-in-c – Alex K. Oct 19 '12 at 12:26
  • Also note that some web sites (news websites, blogs, etc) use JavaScript to insert some hidden attribution text in the selection that will be included when you copy the text. – Deanna Oct 19 '12 at 12:48

1 Answers1

2

As explained in the documentation for the HTML clipboard format, Web browsers can provide an optional SourceURL to specify where the HTML came from.

Raymond Chen
  • 44,448
  • 11
  • 96
  • 135
  • can such info be accessed for other apps like if I copy text from a pdf into m$ Word, the filename of the pdf document also gets copied. It would be great for collecting material for personal research and then later be able to get the source. I mean generally what additional information can be programmatically accessed along with copied content on windows platform, where can I find documentation or other reference material on this topic. – timmaktu Oct 20 '12 at 09:26
  • 1
    Please only one question per SO post. Also, writing "m$" is going to make certain people unwilling to help you further. – Raymond Chen Oct 22 '12 at 22:49