Copy link to clipboard
Copied
Help!! How can I configure a button to save a form to one drive or to my computer? I have tried these three methods and none of them work for me:
1. First I configured a button and added the action of submitting a form and placed the link in a folder on my sharepoint site and the error "403 forbidden" appeared even though everything was public.
2. In the same action of sending a form I placed this path ("C:\\Users\\Jomaris Meneses\\Videos\\Forms\\myfile.pdf") so that it would be saved on my computer and a message appears that It says that to submit the form I must be in a web browser and it doesn't save either.
3. And finally, I decided to try to execute a javascript code when clicking the button. I used the code that I will show below. It may have errors since I don't have much experience. When I run the code I get this error: NotAllowedError: The security configuration prevents access to this property or method.
Doc.saveAs:6:AcroForm:btn:Annot1:MouseUp:Action1
However, I do not have the pdf file with any type of security.
This is the image of the error mentioned above
This is the code I used in the save button.
btn = button name
ruta = path where I want to save the pdf on my computer
// Function to save the file to a specific location on the computer
function guardar() {
var ruta = "C:\\Users\\Jomaris Meneses\\Videos\\Forms\\miarchivo.pdf"; // Ruta donde deseo guardar el archivo en el equipo
// Save the file to the specific location
this.saveAs(ruta);
app.alert("El archivo se ha guardado en la ubicación específica correctamente.", 3);
}
// Associate the 'save' function to the button's click event (I don't know if this line of code is necessary, however, when I don't place it, when I click on the button nothing happens.)
this.getField("btn").setAction("MouseUp", "guardar();");
I appreciate you can help me since I'm new to all this, I don't know what I'm doing wrong and the information is a bit limited. Thank you very much in advance!!!
Have something to add?
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more