Problem

When you attempt to copy an OLE object or ActiveX Control (OCX) from an Office application in a remote Terminal Server session and then paste it into a local application on the client machine, you will only get a static representation of the data (typically a WMF metafile) instead of the OLE/OCX object you intended to copy and paste.  In addition, if you choose Paste Special on the local client, you will notice that there is no option to insert the data as OLE/OCX into the local document. 

Cause

OLE/OCX data is not transferred to the client from the Window Remote Desktop session.  By design, the RDP Clipboard service will exclude clipboard formats that rely on running objects or data sources that are not directly accessible outside of the current machine since those data formats cannot be used properly by external machines.  By excluding these formats, the local client machine's clipboard will only contain the static presentation data of the OLE object, which is typically in WMF, HTML, and/or Text format.  As such, what gets pasted into the client document is static data that cannot be later edited or updated by OLE linking and embedding, or initialized as an OCX for interaction.

More Information

Windows Remote Desktop provides clipboard sharing between the remote desktop session and the client using a service called the RDP Clipboard.  This service will take the active contents on the remote desktop and transfer the data to the client clipboard.  However, the service will not handle all clipboard formats.   Specifically, the RDP Clipboard (for both Windows 2003 and Windows 2008) will intentionally exclude the following clipboard formats when copying data to the local client desktop:

Excluded Clipboard Formats (Standard Formats)

CF_BITMAP

CF_DSPBITMAP

CF_OWNERDISPLAY

CF_ENHMETAFILE

CF_DSPENHMETAFILE

CF_HDROP**

Excluded Clipboard Formats (Named Formats)

Link

Embed Source

Preferred DropEffect**

OwnerLink

Embedded Object

FileName**

ObjectLink

DragContext

FileNameW**

Ole Private Data

Office Drawing Shape Format

FileGroupDescriptor**

DataObject

RTF in UTF8*

FileGroupDescriptorW**

DataObjectAttributes

InShellDragLoop

FileContents**

Link Source

Shell IDList Array

 

Link Source Descriptor

Shell Object Offsets

 


* Only applies to WinCE
** Only applies if drive file is located at is not also mapped as remote drive.

In addition to these fixed formats, the RDP Clipboard will also limited the transfer of IDataObject rendered clipboard formats that are not of type TYMED_HGLOBAL.  So data formats that are rendered by direct GDI handle or OLE stream/storage will not be transferred as well. (One exception to this is the "FileContents" clipboard format -- when remote drive access is enabled, that format can be rendered in TYMED_STREAM format, but it is the only non-HGLOBAL type allowed.)

The RDP Clipboard limits certain standard formats for portability reasons.  This includes device dependent bitmaps and enhanced metafiles that may contain device specific draw routines that may not fully supported on all clients. It also includes file copy formats that may not supported unless the user also has the hard drive where the file contents are located mapped as a remote drive in the RDP session.

Also excluded are all the OLE linking and embedding clipboard types, as well as the "Office Drawing Shape Format" type used for copy/paste of OCX controls. The reason the OLE formats and the Office Drawing Shape Format are excluded is because those formats rely on running objects which are private to that Windows desktop. They cannot be ported to the client via the clipboard, so they are removed to avoid errors on the client side.  However, their removal may cause static data to be pasted accidently instead of the OLE/OCX object intended.  This is a side effect of the shared clipboard design.