How to: Copy class diagram elements to a Microsoft Office document

Applies to: yesVisual Studio noVisual Studio for Mac noVisual Studio Code

You can copy shapes from a .NET class diagram (.cd file) to other documents. You'll either get a copy of the shape or its underlying code, based on the kind of document where you paste it. To copy shapes from UML class diagrams in a modeling project, see Export diagrams as images.

Copy a single element

Right-click the shape and choose Copy Image.

Copy several elements

  1. Select the shapes on the diagram that you want to copy.

  2. Right-click your selection and choose Copy Image.

Copy all the elements in a class diagram

  1. Right-click the diagram surface and choose Select All, or press Ctrl + A.

  2. On the Edit menu, select Copy Image.

You can also choose Copy instead of Copy Image. Copy copies the image as a regular bitmap. Copy Image copies the image as a vector-based image, which is better for most Office applications.

See also