473,386 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 1566

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: tabonni | last post by:
Hi all I want to create an ASP page, which can copy the real PDF files into the clipboard and then the user can paste it in Outlook message as attachments(it's like inserting attachments) My...
by: tabonni | last post by:
Hello All I am creating an ASP page. There are a list of filename and checkbox next to it. When user checked all the documents they want and click ADD TO CLIPBOARD button. All filepaths will be...
by: Legendary Pansy | last post by:
I was checking out the 101 C# Samples, specifically Windows Forms - Use the Clipboard. I took a look at the code for a while, and I understand what the program is doing with the cut, copy, pasting...
by: DraguVaso | last post by:
Hi, I'm looking for a way to Copy and Paste Files to the clipboard. I found a lot of articles to copy pieces of text and bitmaps etc, but nog whole files. Whay I need is like you have in...
by: DraguVaso | last post by:
Hi, I want my application to Paste Outlook 97 Attachements with the ClipBoard or something likE that. Unfortunately the ClipBoard treats Outlook-Attachements otherwise than 'normal' Files (they...
by: Keith | last post by:
I'm trying to come up with a way to create a contextmenu that will do all the "standard" functions (cut, copy, paste, undo, etc). There seems to be a lot of information out there - but nothing...
by: lgbjr | last post by:
Hello All, Im using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
by: Sai | last post by:
I am trying to copy a range as a picture from excel and paste that into a picturebox on a form. The code I am using to copy is...
by: dom_perron | last post by:
Hi, I have a problem when I want to paste data from a workbook to another in excel using the clipboard. Each time a try to paste the data in the active sheet I got an exception "Microsoft Office...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.