Dmitry ... Clipboards ..

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.
 
D

Dmitry Streblechenko

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
 
D

Dmitry Streblechenko

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
 
M

Michael Tissington

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.
 
D

Dmitry Streblechenko

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top