Access + vba

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

Guest

Hi,
I am using code found here http://www.mvps.org/access/api/api0032.htm
to allow users to drag and drop files into my Access 2003 application.
users to drag and drop files from a variety of sources into the application.
The only "Snag" to date is that it refuses to accept attachments dragged
directly from Outlook email messages.
I don't know how to get Data that drag-and-drop.
with this link I'm using to D&D:
If Msg = WM_DROPFILES Then
I whant to ask if MSG = attached file.. :-)

In C# you have this code to find out if it's virtual file (email attached
file) or if it's explorer file:
http://www.codeproject.com/csharp/TestEmailDragDrop.asp

if (e.Data.GetDataPresent(DataFormats.FileDrop))
{ e.Effect = DragDropEffects.Copy;}
// or this tells us if it is an Outlook attachment drop
else if (e.Data.GetDataPresent("FileGroupDescriptor"))
{ e.Effect = DragDropEffects.Copy;}

In VB you can get to know what file is it with:
If Data.GetFormat(vbCFFiles) Then.........
from: http://reliableanswers.com/vb/samples.asp
OLEDragDrop.zip

Thank you soooooo!!!!
I need you help....................
Yael
 
Hi Stefan Hoffmann,
mmm..Thank's but what do you mean:
"locate it via Outlook automation and extract the attachment by automation"
Is it Outlook definition? (in the Outlook application?)
I don't want to do definitions inside the outlook.
Any idea???
Thank you!
 
hi Yael,
mmm..Thank's but what do you mean:
"locate it via Outlook automation and extract the attachment by automation"
Is it Outlook definition? (in the Outlook application?)
I don't want to do definitions inside the outlook.
When you get the email dropped to your application, you can easily
extract the message id. You can use this id to search in Outlook for the
email and extract the attachment using Outlook.

http://www.outlookcode.com/article.aspx?ID=40


mfG
--> stefan <--
 
hi Yael,
mmm..Thank's but what do you mean:
"locate it via Outlook automation and extract the attachment by automation"
Is it Outlook definition? (in the Outlook application?)
I don't want to do definitions inside the outlook.
When you get the email dropped to your application, you can easily
extract the message id. You can use this id to search in Outlook for the
email and extract the attachment using Outlook.

http://msdn2.microsoft.com/en-us/library/aa159619(office.11).aspx


mfG
--> stefan <--
 
Hi Stefan,
Thank's for your replays.
I know this option, but with this code I'm specifically coding for outlook.
I whant to create a form in ms access that get the file d&d name (virtual
file - outlook attached, or file from explorer).

Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment

In my api code (as in the link for d&d vba) I have:
If Msg = WM_DROPFILES Then
' explorer file
** now I want to ask in somehow if it's a virtual file ** (maybe this?
CF_HDROP )
else If Msg = *** attached file from outlook

I'm vere breaking my mined with this topic, so thank's for any help.
Yael.
 
Back
Top