Dmitry ... Clipboards ..

  • Thread starter Thread starter Michael Tissington
  • Start date Start date
M

Michael Tissington

When pasting button faces anything in the clipboard before this operation
will be lost.

Obviously I need to save what is on the clipboard and then restore it.

With all the different formats of clipboard data how do you get around this
?

Thanks.
 
In Outlook 2000 and below, you need to use the clipboard. In Outlook
2002/2003, you can use CommandBarButton.Picture and Mask properties.
I usually save text, CF_OEMTEXT, CF_HTML, CF_UNICODETEXT, CF_RTF, bitmap,
metafile, and files (CF_HDROP).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Got it - a word of caution: do not set the clipboard data in a loop. The
order is important: if you set Unicode text, then ANSI, obviously Unicode
text will overwritten by the ANSI text.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Why would what I sent you send the data in a loop ?

After all I'm just putting back on it what I took off.
 
I meant setting various clipboard formats in a loop - when you set the plain
text data, Unicode data is overwritten. If there was gebuine Unicode data,
all you will get is a plain text version.
This is much like setting PR_RTF_COMPRESSED, then PR_BODY property for an
RTF aware store - if you set text first, then RTF, you are fine. If you set
RTF, then text, RTF will be converted to plain text.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top