Reputation: 326
I have an asp.net/C# web application. I have an image steaming .aspx page to render images. I have to copy an image to client's clipboard. So I first load the image in a hidden image box and copy it to clipboard by using javascript command
ctrlRange.execCommand('Copy');
Image does copies to clipboard. It can be pasted in MSPaint. But it cannot paste in MS word. When try to paste it appear as small white box. Requirement is to paste image on MS word.
Thanks
Upvotes: 1
Views: 6875
Reputation:
Issue seems to be with "Word paste" doing an additional web request, where as paint or Paste special doesn't do the second request. if the pasting content(image) is behind some sort of authentication (ex.forms authentication), the second request done by Word fails resulting in failing to paste the image properly.
This is related with, Internet Options -> General -> Browsing history ->Settings->Check for never versions of stored pages. When it's set to automatic, things work as expected even in Word and this fails with the setting "Every time I visit the web-page"
Upvotes: 1