Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5648 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I have a script that will take each record and save it as its own PDF (with a unique name)

I cant seem to figure out how to allow the user to decide on the file path. Currently the path is defined in the script itself, but I need to be able to decide each time where to save the files.

Also is there a way to get the script to notify me before it overwrites a file (ex, Overwrite? Yes / No / No to All / Yes to All)

Heres what I have so far:

-Show Custom Dialog Box ["Export to Separate PDF's; Press Ok to continue or press cancel]

-If [Get (LastMessageChoice) = 1]

Beep

Set Variable [$counter; Value:0]

Loop

Set Variable [$path; Value; "file:exports/scripts & Get(record number) & ".pdf"

Save Records as PDF[Restore; No Dialog; "$path"; Current record]

Set Variable [ $Totalcount: Value:$counter +1]

End Loop

Show Custom Dialog ["Confirmation"; $TotalCount & "files have been created"

Else

Exit Script

End if

Posted (edited)

Unfortunately you can't let the user pick the path, but script the filename.

You can always save the PDFs to Get (DesktopPath), and let the users file the PDF where ever they want.

You can check to see if the file is there first, by importing it into a temp global container. If it succeeds, (Get (lasterror) = 0, then the file is there, otherwise it is not. You could then throw a dialog and let the user decide what to do.

Your script needs modification. To create a PDF for each record you would:

Set $exportPath to a path

Go to first record

Set variable $Counter = 0

Loop

Save as PDF (current record), $exportPath

set variable $counter = $counter +1

Go to Next [Exit after Last]

End Loop

Edited by Guest
Posted

I would take a look at this plug-in ( generously provided by Dempsey ) for free.

http://mooplug.com/features

This topic is 5648 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.