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
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