Copy selected PDF files from ASP page into clipboard & paste it in outlook. How?

T

tabonni

Hi all

I want to create an ASP page, which can copy the real PDF files into
the clipboard and then the user can paste it in Outlook message as
attachments(it's like inserting attachments)

My idea is: When user checked the checkboxes for the requested PDF
files from ASP page and press the "Add To Clipboard" button, all
requested PDF files will be copied into clipboard. Then, the user open
MS outlook message and right click -> Paste all PDF files as
attachments.

But, my code is just can copy the filepaths into clipboard not the
REAL PDF FILES. How can I copy the REAL PDF FILES?

Here is my code:

<html>
<head>
<title></title>
<script type="text/javascript">
function checks() {
var form = document.form1;
var myFiles = "";

for (var i=0; i<form.files.length; i++) {
if (form.files.checked) {
myFiles +=form.files.value;
}
}
alert("Clipboard Data =\n" + myFiles);
window.clipboardData.setData("Text", myFiles)
}
</script>
</head>
<body>
<form name="form1">
<br><input type="checkbox" name="files" value="c:\Temp\file1.pdf">
file1
<br><input type="checkbox" name="files" value="c:\Temp\file2.pdf>
file2
<br><input type="checkbox" name="files" value="c:\Temp\file3.pdf">
file3
<br><input type="button" value="Add To Clipboard" onclick="checks()">
</form>
</body>
</html>

Thanks
 
J

Jeff Cochran

I want to create an ASP page, which can copy the real PDF files into
the clipboard and then the user can paste it in Outlook message as
attachments(it's like inserting attachments)

ASP is server side, your clipboard is client-side. It can't be done.
Try a client-side techniology group and you may find a method to work
for you.

Jeff
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top