This project looks kinda interesting. A question though: how is D&D from attachments of Outlook into a Java application solved? The testprograms only seem to work if the whole message is dropped into a Java application. From there on, a .MSG file is created (or the link to it returned). Is it supposed to read the MSG file and parse the attachments from there one or how is it supposed to work? Is directly dragging and dropping an attachment from Outlook to Java supported?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
in order to D&D an attachment, you have to open the mail (double click) in outlook at first. Then select the attachments tab and drag it onto the test dialog. That's the way it works for me. You will receive an InputStream (MODE_MEMORY_STREAMS, OutlookItem.getContent ) or a temp file (MODE_TEMP_FILES) for the attachment.
I'm able to drag and drop attachments when using Outlook 2007 SP2 on Windows 7 (1.6.0_24 JRE), both from the preview and from the message. However, I am not able to drag and drop attachments from Outlook 2003 SP3 on XP (1.60_26 JRE), either in preview or when viewing the message. I'm using MODE_MEMORY_STREAMS. I had to install the Visual Studio 2010 redistributable on XP, but Visual C++ Express 2010 was already installed on Windows 7, so I didn't need the redistributable for it.
I'm fair to middling with C++/MFC and have written some of my own JNI libraries, so I'm picking my way through the source. If I find anything, I'll post it back to the project.
tl;dr warning: following are the log entries for my two test setups. :-)
Here's the log file output from Outlook 2003 SP3 on XP:
as I can see in the log file, you do not use the current version of the DLL. There was a fix in 1.0.0.2 for using embedded attachements which likely solves your problem too. Since 1.0.0.2 the ANSI version of the FileGroupDescriptor is also evaluated.
The log file (Outlook 2003) prints the format ID for the UNICODE version of the FileGroupDescriptor:
file group descriptor format =49392
Some lines below, the contents of the DataObject are shown:
Since there is no line with format=49392, the UNICODE version of the FileGroupDescriptor is not available. Thus the DLL thinks, the DataObject does not come from Outlook.
Most likely, the format ID 49391 is the ANSI encoded FileGroupDescriptor, but it is only read in later DLL versions.
Regards
Wolfgang Imig
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm embarrassed: First rule of debugging is to make sure one has the newest version, right? :-P
I figured it had to do with the file group descriptor shell clipboard format. I saw the same missing format in dumpFormats and I noticed in the version I had (1.0.0.1) that you were using the unicode file description when registering the format, so I was in the process of trying to register the ascii format, too.
Anyway, I downloaded 1.0.0.4 (I like that you load the dlls from the temp dir now - I've started doing that, too :-) ), scrubbed my system of all traces of the old jar and dll, and tried it again. Success!
Thanks so much; pretty cool project you've got here! :-)
-Peter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hiyas
This project looks kinda interesting. A question though: how is D&D from attachments of Outlook into a Java application solved? The testprograms only seem to work if the whole message is dropped into a Java application. From there on, a .MSG file is created (or the link to it returned). Is it supposed to read the MSG file and parse the attachments from there one or how is it supposed to work? Is directly dragging and dropping an attachment from Outlook to Java supported?
Hello,
in order to D&D an attachment, you have to open the mail (double click) in outlook at first. Then select the attachments tab and drag it onto the test dialog. That's the way it works for me. You will receive an InputStream (MODE_MEMORY_STREAMS, OutlookItem.getContent ) or a temp file (MODE_TEMP_FILES) for the attachment.
If you want to parse an MSG file, you may want to use the Apache POI library: http://poi.apache.org/hsmf/
Regards
I'm able to drag and drop attachments when using Outlook 2007 SP2 on Windows 7 (1.6.0_24 JRE), both from the preview and from the message. However, I am not able to drag and drop attachments from Outlook 2003 SP3 on XP (1.60_26 JRE), either in preview or when viewing the message. I'm using MODE_MEMORY_STREAMS. I had to install the Visual Studio 2010 redistributable on XP, but Visual C++ Express 2010 was already installed on Windows 7, so I didn't need the redistributable for it.
I'm fair to middling with C++/MFC and have written some of my own JNI libraries, so I'm picking my way through the source. If I find anything, I'll post it back to the project.
tl;dr warning: following are the log entries for my two test setups. :-)
Here's the log file output from Outlook 2003 SP3 on XP:
And the log file from Outlook 2007 on Windows 7:
Hello peterguy,
as I can see in the log file, you do not use the current version of the DLL. There was a fix in 1.0.0.2 for using embedded attachements which likely solves your problem too. Since 1.0.0.2 the ANSI version of the FileGroupDescriptor is also evaluated.
The log file (Outlook 2003) prints the format ID for the UNICODE version of the FileGroupDescriptor:
Some lines below, the contents of the DataObject are shown:
Since there is no line with format=49392, the UNICODE version of the FileGroupDescriptor is not available. Thus the DLL thinks, the DataObject does not come from Outlook.
Most likely, the format ID 49391 is the ANSI encoded FileGroupDescriptor, but it is only read in later DLL versions.
Regards
Wolfgang Imig
Thanks for the rapid response, Wolfgang!
I'm embarrassed: First rule of debugging is to make sure one has the newest version, right? :-P
I figured it had to do with the file group descriptor shell clipboard format. I saw the same missing format in dumpFormats and I noticed in the version I had (1.0.0.1) that you were using the unicode file description when registering the format, so I was in the process of trying to register the ascii format, too.
Anyway, I downloaded 1.0.0.4 (I like that you load the dlls from the temp dir now - I've started doing that, too :-) ), scrubbed my system of all traces of the old jar and dll, and tried it again. Success!
Thanks so much; pretty cool project you've got here! :-)
-Peter