By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,812 Members | 863 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,812 IT Pros & Developers. It's quick & easy.

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

P: n/a
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[i].checked) {
myFiles +=form.files[i].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
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 5 Sep 2004 03:15:07 -0700, ta*****@yahoo.com (tabonni) wrote:
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
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.