Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Script to Browse and Add an Attachment
  FAQ FAQ  Forum Search   Register Register  Login Login


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 Post Reply
Author
mhoney View Drop Down
New Member
New Member


Joined: 17 Dec 2013
Location: Australia
Points: 34
Post Options Post Options   Quote mhoney Quote  Post ReplyReply Direct Link To This Post Topic: Script to Browse and Add an Attachment
    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.Smile

  
Michael.
Back to Top
Sponsored Links


Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 629
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 11 Apr 2014 at 9:34am
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
Back to Top
mhoney View Drop Down
New Member
New Member


Joined: 17 Dec 2013
Location: Australia
Points: 34
Post Options Post Options   Quote mhoney Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 2014 at 4:40am
Thanks for your help that is exactly what I need.

Michael.
Michael.
Back to Top
Ragu View Drop Down
New Member
New Member
Avatar

Joined: 06 Feb 2015
Location: Ontario Canada
Points: 1
Post Options Post Options   Quote Ragu Quote  Post ReplyReply Direct Link To This Post Posted: 06 Feb 2015 at 6:58pm
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.078 seconds.