copy file to clipboard

E

Elad

Hi all,

I need a VBA code that copy file to clipboard,

I have button on my form, when clicked, I whant that the file
c:\order\FileName.doc
will be copy to the clipboard (the file itself - not only the text)

next time the user do "paste" in folder or mail the file wil be paste.

thank you

elad
 
M

Mr B

I am assuming that you want to do this from Access.

If so, you can use VBA code to open MS Word. Then write code that will
select all of the contents of the opened document to the clipboard, then
close the document and Word.

Try doing some searches in this news group, and/or others for specific
solutions for each of the steps above.

Mr. B
 
J

John Nurick

This can't be done in standard VBA or with the VB Clipboard object. It
may be possible using the Windows API clipboard functions: try a web
search for
CF_HDROP copy paste file
and you'll probably find some code that you can study and adapt or
translate.

Unless you really enjoy poking round the API, I suggest that you revise
your user interface instead. For instance, you could provide two
buttons:

- one that creates a new mail message with the the file attached

- one that displays the standard Browse Folder dialog so the user can
select a folder to which the file should be copies.
 

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