Hi,
I use the following to save the content and restore to the clipboard but
finally the clipboard is empty:
private IDataObject _clipboardContent;
private void StoreClipboardContent()
{
_clipboardContent = Clipboard.GetDataObject();
}
private void RestoreClipboardContent()
{
Clipboard.SetDataObject(_clipboardContent, true);
}
As I called:
StoreClipboardContent();
rngTarget.Copy();
rngInsertBookmark.Paste();
RestoreClipboardContent();
After application exits, I opened a word document and CTRL-V, there is
nothing to be pasted.