Paste Copied File From Clipboard To File System

John Steed

If the user has copied a file to the clipboard in the file system, I would like the user to return to an Excel spreadsheet and click a button. The code behind this button should paste this file to a predefined folder.

I know it is possible through VBA to read/write a string to/from the clipboard. Is it possible in VBA to read a copied file from the clipboard and place it in a folder (file doesn't need to be opened during this operation)?

Carl Colijn

When you copy a file to the clipboard in Explorer, the file itself isn't placed on the clipboard (image what would happen if you copy a file of 200GB :) ). Instead Explorer puts e.g. the file's path on the clipboard in a special clipboard format (i.e. non-textual). You can read more on the formats at MSDN.

I haven't worked closely with these clipboard formats, but it seems that in most cases you would look for the CF_HDROP format. You'd need quite some VBA to massage the data into the file's path, but from there on it's a simple file copy to complete the operation.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

how can I paste copied-clipboard text to a file from terminal?

From Dev

how can I paste copied-clipboard text to a file from terminal?

From Dev

paste content from clipboard to text file in ex mode?

From Dev

How can I paste an image from clipboard directly to a file?

From Dev

How to load a stream with a file copied in Windows clipboard

From Dev

how to paste into tmux from system clipboard

From Dev

run a jar file from another Java copied in system

From Dev

Using paste function from a clipboard manager while renaming a file inline using a file manager

From Dev

How to copy contents of a (large) vim file to the OSX system clipboard to paste in other apps?

From Dev

Yank file path with line no from vim to system clipboard

From Dev

Setting correct permissions automatically for certain file type when file is copied from non-Linux file system

From Dev

Bash: save clipboard to a file with line breaks like it was copied

From Dev

Copy image from clipboard to file

From Dev

Save text from the clipboard to a file

From Dev

Vim: copy from file to clipboard

From Java

How to make vim paste from (and copy to) system's clipboard?

From Dev

Getting a copied email from the clipboard

From Dev

Copy full file path into Copy-Paste-Clipboard

From Dev

How do I copy a file to the clipboard and paste it somewhere else?

From Dev

Paste an image from the Clipboard into Excel

From Dev

Excel VBA - Paste from clipboard

From Dev

Copy and Paste from Clipboard to URxvt

From Dev

How to paste into nano from clipboard?

From Dev

Shortcut to paste text not from clipboard

From Dev

Python - Gtk - paste from clipboard

From Dev

Copy from clipboard and paste into a userform

From Dev

get data from clipboard (copied from Powerpoint)

From Dev

image (noninlineshape) from Word to clipboard to file

From Dev

How to save image from clipboard to file in UWP

Related Related

  1. 1

    how can I paste copied-clipboard text to a file from terminal?

  2. 2

    how can I paste copied-clipboard text to a file from terminal?

  3. 3

    paste content from clipboard to text file in ex mode?

  4. 4

    How can I paste an image from clipboard directly to a file?

  5. 5

    How to load a stream with a file copied in Windows clipboard

  6. 6

    how to paste into tmux from system clipboard

  7. 7

    run a jar file from another Java copied in system

  8. 8

    Using paste function from a clipboard manager while renaming a file inline using a file manager

  9. 9

    How to copy contents of a (large) vim file to the OSX system clipboard to paste in other apps?

  10. 10

    Yank file path with line no from vim to system clipboard

  11. 11

    Setting correct permissions automatically for certain file type when file is copied from non-Linux file system

  12. 12

    Bash: save clipboard to a file with line breaks like it was copied

  13. 13

    Copy image from clipboard to file

  14. 14

    Save text from the clipboard to a file

  15. 15

    Vim: copy from file to clipboard

  16. 16

    How to make vim paste from (and copy to) system's clipboard?

  17. 17

    Getting a copied email from the clipboard

  18. 18

    Copy full file path into Copy-Paste-Clipboard

  19. 19

    How do I copy a file to the clipboard and paste it somewhere else?

  20. 20

    Paste an image from the Clipboard into Excel

  21. 21

    Excel VBA - Paste from clipboard

  22. 22

    Copy and Paste from Clipboard to URxvt

  23. 23

    How to paste into nano from clipboard?

  24. 24

    Shortcut to paste text not from clipboard

  25. 25

    Python - Gtk - paste from clipboard

  26. 26

    Copy from clipboard and paste into a userform

  27. 27

    get data from clipboard (copied from Powerpoint)

  28. 28

    image (noninlineshape) from Word to clipboard to file

  29. 29

    How to save image from clipboard to file in UWP

HotTag

Archive