Drop outlook item (message) in own application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I´m developing a feature in a application with the following specification:

In the first step, the application should be able to store messages out of
outlook, which are dropped on a tree view. This message should be stored as
..msg file.
In future, this should be able for alle objects of outlook.

If a drop a message out of outlook, I can get the file name of the message
by the DragEventArgs e of my tree view. But there is no way to get the
physical file, to store them.

Important:
The object of outlook should not be accessed by outlook object model.

Does anybody know how I could implement this?
Thanks for help.

Alexander Kommer
 
Alexander,

Generally, you are going to have to look at the different formats that
are offered to you on the drag/drop operation. There should be one which
will allow you to get the instance information without accessing the object
model of outlook directly. Of course, if you want properties of these items
(instead of just the data that makes them up) you will have to use the
object model in some way.

Take a look at the data formats offered to you on the drag/drop
operation. Something will probably stick out as a way to get the data
behind the object.
 
Alexander,

Generally, you are going to have to look at the different formats that
are offered to you on the drag/drop operation. There should be one which
will allow you to get the instance information without accessing the object
model of outlook directly. Of course, if you want properties of these items
(instead of just the data that makes them up) you will have to use the
object model in some way.

Take a look at the data formats offered to you on the drag/drop
operation. Something will probably stick out as a way to get the data
behind the object.

Unfortunately, the clipboard will never give you all the information
you need. If you want to save a .msg file, you'll likely have to
build an outlook add-in that will export the items you want. I have a
similar plugin which saves emails in .msg format (by calling the Save
on the MailItem class) and then saves that file to my database.

As Nicholas said though, you'll need to use the Outlook object model
for this. I recommend getting Visual Studio Tools for Office to help
you with this task. its a VS 2005 add-in that gives you serveral new
project templates, one of them being Outlook Add-in.
 

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

Back
Top