Access 2003 + vba

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
 
A

Arvin Meyer [MVP]

You can open Explorer and drag the file from Outlook or Outlook Express into
a blank folder, then drag them into Access using the code on the Access Web.
It is a 2 step process, but only adds a second or 2 to each file.
 
G

Guest

:(
Thank's for your replay, but no, I don't want to to d&d the attached file
from outlook in 2 steps.
I don't know how to get Data that drag-and-drop.
It's not possiable in vba?
So..Am I have to use this link for d&d files or with hyperlink or ole object?:
http://www.mvps.org/access/api/api0032.htm
When I'm running this in access 2003 sometimes I have a problem to close the
applivation and to move this form, Do you know why?

Why in vb and in c# it's possible and in vba it's not?
c#: e.Data.GetDataPresent("FileGroupDescriptor")
vb: If Data.GetFormat(...) Then.........
 
S

Scott McDaniel

:(
Thank's for your replay, but no, I don't want to to d&d the attached file
from outlook in 2 steps.
I don't know how to get Data that drag-and-drop.
It's not possiable in vba?

AFAIK, you can't manipulate D&D with pure VBA. There are several API calls that are associated with these methods, of
course, and you might be able to muck around with them and get them to work. Randy Birch has a VB-centric site with
code:

http://vbnet.mvps.org/index.html?code/file/filedragdrop.htm

Perhaps you could adapt this to work? I've never tried to, as I've never attempted to do this

So..Am I have to use this link for d&d files or with hyperlink or ole object?:
http://www.mvps.org/access/api/api0032.htm
When I'm running this in access 2003 sometimes I have a problem to close the
applivation and to move this form, Do you know why?

Why in vb and in c# it's possible and in vba it's not?
c#: e.Data.GetDataPresent("FileGroupDescriptor")
vb: If Data.GetFormat(...) Then.........

Because the people who developed VBA didn't make it possible ... that's kinda like asking why can't I watch television
on my radio.


Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
G

Guest

Hi Scott McDaniel and thank's for your replas.
This link is in vb....
I'm 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.
The only "Snag" to date is that it refuses to accept attachments dragged
directly from Outlook email messages.
It's the same idiea as your link?
http://vbnet.mvps.org/index.html?code/file/filedragdrop.htm

What about this method to add the api code:
If (IsClipboardFormatAvailable(CF_TEXT)) Then.....????? for check if it's
outlook attached file..
 

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

Top