Jump to content
Server Maintenance This Week. ×

Using field for file name for export in FM6


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

Recommended Posts

Hi,

This question has been asked for FM8 but I don't see any post regarding FM6.

I want to export to a file, using data from one of my fields as the filename. eg, create a PDF document of an invoice, using the invoice number as the filename.

Is there a script step that an do this in FM6??

thanks

Link to comment
Share on other sites

OK Thanks.

Agreed that PDF output came only in FM8, but if you have Adobe Acrobat installed (not just the reader) you can create a PDF from ANY application. You just select output to PDF as a printer.

Link to comment
Share on other sites

The naming functionality is in the PDF printer. I've used Win2PDF extensively for this. Win2PDF requires you to write the name of the PDF to the registry before printing so it took a bit of VBscripting to do that, but it worked fine.

Alternatively you could print to a fixed name and then use the OS to rename and/or move the file automatically.

Link to comment
Share on other sites

For just the renaming after the file is printed to a fixed name you don't need VBscript.

You use the "Send Message" (FM6) or "Send Event" (FM7/8) script step to execute an OS command line:

%comspec% /c ren c:fixed.pdf c:somethingElse.pdf

You can use a calc to make this string so it can use your data.

Link to comment
Share on other sites

This topic is 6562 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.