CopyToClipboard
✖
CopyToClipboard
Details

- The expression expr is evaluated and typeset before being copied to the clipboard. To copy a textual form, specify a string or InputForm[expr].
- CopyToClipboard[Defer[expr]] copies the unevaluated form of expr.
- CopyToClipboard["string"] copies the contents of "string" as plain text.
- The expression expr can be any expression, including those that represent notebooks or cells.
- CopyToClipboard supports typeset expressions, such as StandardForm and TraditionalForm.
- When pasted in between cells, the results of CopyToClipboard will be at the highest fidelity. Style or formatting information may be lost when pasting into an existing cell or when pasting into an application other than the Wolfram System.
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Copy a simple expression to the clipboard:

https://wolfram.com/xid/0jz7xhmxkxd9xm-b38lfk

Use Defer to copy an unevaluated form of the expression:

https://wolfram.com/xid/0jz7xhmxkxd9xm-ct98e

Copy the StandardForm representation of an expression:

https://wolfram.com/xid/0jz7xhmxkxd9xm-b6kcvg

Copy the InputForm representation of an expression:

https://wolfram.com/xid/0jz7xhmxkxd9xm-cup3ti

https://wolfram.com/xid/0jz7xhmxkxd9xm-h8sxpt
Scope (3)Survey of the scope of standard use cases
Generalizations & Extensions (2)Generalized and extended use cases
A series of discrete cells can be copied by using DocumentNotebook:

https://wolfram.com/xid/0jz7xhmxkxd9xm-ijjo
Copied cells preserve any specified style information:

https://wolfram.com/xid/0jz7xhmxkxd9xm-kd1so

https://wolfram.com/xid/0jz7xhmxkxd9xm-1hyqbi
Applications (2)Sample problems that can be solved with this function
Properties & Relations (1)Properties of the function, and connections to other functions
Possible Issues (2)Common pitfalls and unexpected behavior
Evaluation of expressions can have unexpected effects such as reordering the copied result:

https://wolfram.com/xid/0jz7xhmxkxd9xm-d4ihi

All such effects can be prevented using Defer:

https://wolfram.com/xid/0jz7xhmxkxd9xm-g3k9yf

When CopyToClipboard receives a string with embedded typesetting, it is copied using linear form:

https://wolfram.com/xid/0jz7xhmxkxd9xm-dvujwh

Wolfram Research (2010), CopyToClipboard, Wolfram Language function, https://reference.wolfram.com/language/ref/CopyToClipboard.html.
Text
Wolfram Research (2010), CopyToClipboard, Wolfram Language function, https://reference.wolfram.com/language/ref/CopyToClipboard.html.
Wolfram Research (2010), CopyToClipboard, Wolfram Language function, https://reference.wolfram.com/language/ref/CopyToClipboard.html.
CMS
Wolfram Language. 2010. "CopyToClipboard." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CopyToClipboard.html.
Wolfram Language. 2010. "CopyToClipboard." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CopyToClipboard.html.
APA
Wolfram Language. (2010). CopyToClipboard. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CopyToClipboard.html
Wolfram Language. (2010). CopyToClipboard. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CopyToClipboard.html
BibTeX
@misc{reference.wolfram_2025_copytoclipboard, author="Wolfram Research", title="{CopyToClipboard}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/CopyToClipboard.html}", note=[Accessed: 16-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_copytoclipboard, organization={Wolfram Research}, title={CopyToClipboard}, year={2010}, url={https://reference.wolfram.com/language/ref/CopyToClipboard.html}, note=[Accessed: 16-April-2025
]}