I have a web service that runs in the MTA that needs to copy some HTML to
the clipboard to use in Word.
When I try copying to the clipboard (Clipboard.SetDataObject()), I get a
thread exception (I need to be in the STA). When I create a temporary STA
thread and make the copy, the call to SetDataObject() works fine, however
the application that needs to paste the data (in this case Microsoft Word
2003), throws an exception saying the Clipboard is invalid or empty.
Any ideas?
No you should only use it from an STA thread.
>I have a web service that runs in the MTA that needs to copy some HTML to
>the clipboard to use in Word.
Why do you have to go via the clipboard to get data into Word?
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.