Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum. |
Script to Browse and Add an Attachment |
Post Reply ![]() |
Author | |
mhoney ![]() New Member ![]() Joined: 17 Dec 2013 Location: Australia Points: 34 |
![]() ![]() ![]() ![]() Posted: 11 Apr 2014 at 7:21am |
Hi,
Hoping you might be able to be so kind as to suggest some script that allows a user to click a button, browse for a file and add it as an attachment. I have an example that requires a user to put in the file name and path in some fields, but I don't know how to browse for a file without a user having to input this information (makes it easier for them). Thanks for your help. ![]() |
|
Michael.
|
|
![]() |
|
try67 ![]() Senior Member ![]() Joined: 15 Jul 2011 Points: 634 |
![]() ![]() ![]() ![]() |
This code will prompt the user to select a file and will then attach that file to the PDF, under the given name ("Attachment1", in this case):
this.importDataObject({cName: "Attachment1"}); |
|
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com |
|
![]() |
|
mhoney ![]() New Member ![]() Joined: 17 Dec 2013 Location: Australia Points: 34 |
![]() ![]() ![]() ![]() |
Thanks for your help that is exactly what I need.
Michael.
|
|
Michael.
|
|
![]() |
|
Ragu ![]() New Member ![]() ![]() Joined: 06 Feb 2015 Location: Ontario Canada Points: 1 |
![]() ![]() ![]() ![]() |
Hi
That was very helpful, now I know how to add a attachment button to PDF. Could you please let me know what I can do to attach multiple files. I could attach multiple files by clicking but they are not being saved. Only the last attached file is saved Thanks |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |