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?
Thanks.
AA