Drag and drop files into form

S

sheetsumon

I have users inputting information from Outlook e-mails, including received
and sent attachment(s). I want the user to be able to drag and drop the file
(s) from their Outlook inbox mail to an Access form, which will do two things
simultaneously:

After Drag and Drop:
1) Copy the file to a shared network folder
2) Create a hyperlink to the file on the form

I found the site below, but I don't want to use AddressOf.
http://www.mvps.org/access/api/api0032.htm

Does anyone have any experience with this?
Please help.
 
D

Douglas J. Steele

The only reason that page mentions that external AddressOf is because it was
written for Access 97, which doesn't have AddressOf built into it.

Assuming you're using Access 2000 or newer, change the routine sHook to:

Sub sHook(Hwnd As Long, _
strFunction As String)
lpPrevWndProc = apiSetWindowLong(Hwnd, _
GWL_WNDPROC, _
AddressOf strFunction)
End Sub

On the other hand, if I've misinterpretted your objection to AddressOf, and
you really did mean that you didn't want to use AddressOf, I'm afraid you
have no choice if you want that functionality.
 
S

sheetsumon via AccessMonster.com

Douglas,

Thank you for this information. I've searched the internet endlessly for
advice on this, and up till now, I haven't found a thing. The only reason I
didn't want to use the AddressOf functionality was to avoid from making every
user have to download it. Fortunately, everyone's using Access 2000, so the
fix you provided should prove useful.
I'll do some testing with it and I'll let you know if I have any problems.

Thank you again for your help!!
Jon
The only reason that page mentions that external AddressOf is because it was
written for Access 97, which doesn't have AddressOf built into it.

Assuming you're using Access 2000 or newer, change the routine sHook to:

Sub sHook(Hwnd As Long, _
strFunction As String)
lpPrevWndProc = apiSetWindowLong(Hwnd, _
GWL_WNDPROC, _
AddressOf strFunction)
End Sub

On the other hand, if I've misinterpretted your objection to AddressOf, and
you really did mean that you didn't want to use AddressOf, I'm afraid you
have no choice if you want that functionality.
I have users inputting information from Outlook e-mails, including received
and sent attachment(s). I want the user to be able to drag and drop the
[quoted text clipped - 12 lines]
Does anyone have any experience with this?
Please help.
 
D

Douglas J. Steele

Every user wouldn't have had to download AddressOf. You would have
downloaded it, and included the VBA code in your application. Every user
would then be able to use it in conjunction with your application.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


sheetsumon via AccessMonster.com said:
Douglas,

Thank you for this information. I've searched the internet endlessly for
advice on this, and up till now, I haven't found a thing. The only reason
I
didn't want to use the AddressOf functionality was to avoid from making
every
user have to download it. Fortunately, everyone's using Access 2000, so
the
fix you provided should prove useful.
I'll do some testing with it and I'll let you know if I have any problems.

Thank you again for your help!!
Jon
The only reason that page mentions that external AddressOf is because it
was
written for Access 97, which doesn't have AddressOf built into it.

Assuming you're using Access 2000 or newer, change the routine sHook to:

Sub sHook(Hwnd As Long, _
strFunction As String)
lpPrevWndProc = apiSetWindowLong(Hwnd, _
GWL_WNDPROC, _
AddressOf strFunction)
End Sub

On the other hand, if I've misinterpretted your objection to AddressOf,
and
you really did mean that you didn't want to use AddressOf, I'm afraid you
have no choice if you want that functionality.
I have users inputting information from Outlook e-mails, including
received
and sent attachment(s). I want the user to be able to drag and drop the
[quoted text clipped - 12 lines]
Does anyone have any experience with this?
Please help.
 

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