471,354 Members | 1,213 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Paste an attached file in Outlook from the Clipboard in Windows Fo

I’m trying to get the path and name of an attached file in to email message
in Outlook using the Clipboard.

The idea is ….

IDataObject data = Clipboard.GetDataObject();

String[] myFormatsArray = data.GetFormats(false);

// list of all formats when COPY to Clipboard from a file attached to
Outlook is:
// "FileContents", "FileGroupDescriptor", "RenPrivateFileAttachments",
"Text", "UnicodeText"

MemoryStream stream = (MemoryStream)data.GetData("FileContents",true);
byte [] CopyOrCutFlag = new byte[] { (byte)stream.ReadByte(), 0, 0, 0 };

MemoryStream stream1 =
(MemoryStream)data.GetData("FileGroupDescriptor",t rue);
byte [] CopyOrCutFlag1 = new byte[] { (byte)stream.ReadByte(), 0, 0, 0 };

MemoryStream stream2 =
(MemoryStream)data.GetData("RenPrivateFileAttachme nts",true);
byte [] CopyOrCutFlag2 = new byte[] { (byte)stream.ReadByte(), 0, 0, 0 };

How can I continue? ….
Is there another way?

Feb 10 '06 #1
0 1390

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Legendary Pansy | last post: by
reply views Thread by DraguVaso | last post: by
2 posts views Thread by Keith | last post: by
7 posts views Thread by lgbjr | last post: by
1 post views Thread by Sai | last post: by
1 post views Thread by dom_perron | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.