MikeGSuppe
Mar 24 2012, 03:31 PM
Greetings
I have set up my code for export invoices to be printed via PDF. I have enjoyed setting up the code so that each file name can have a unique name with identification.
Now it is time to start going beyond that and print each file to a specific directory for each individual country we export to ie India or Taiwan etc
Are there any clues how this can be done?
Thanks
~mike
theDBguy
Mar 24 2012, 04:22 PM
Hi Mike,
You could just include the directory path to the filename as you export the report to PDF, couldn't you?
Just my 2 cents...
jwhite
Mar 24 2012, 07:39 PM
Let's say the primary folder holding the country folders is called "C:\Data\Invoices".
If you store "C:\Data\Invoices" in a Defaults table:
tblDefaults
-----------------
DefItem, Text
DefValue, Text
Have a record: "PDFPath", "C:\Data\Invoices"
Then when you need to build the filepath, just do:
DLookup("DefValue","tblDefaults","DefItem='PDFPath'")
I presume you are already storing somewhere the country, so it might be something like:
strOutputFileSpec = DLookup("DefValue","tblDefaults","DefItem='PDFPath'") & "\" & strCountryName & "\" & strInvoiceNumber & ".PDF"