Creating automatically different export paths

  • Thread starter Thread starter GeoHunter
  • Start date Start date
G

GeoHunter

I run a report for multiple customers - for each customer
it's own report. In my proccess after the report is
generated it is exported to a specific location and after
it is e-amiled as an attachment. Is there possible to
create on the fly a new path where to save the reports?
Let's to say for customer AA the path will be
C:\MyDocument\AA, for cust BB to save in
C:\MyDocument\BB...my question if the folder AA or BB can
be created through the proccess not before I run the
reports?

thx
 
VBA contains the command MkDir which allows you to create a new directory.
 
Ken, can you please show me the line of code, I'm sot very
good in code.

thx
 
If Dir("C:\MyDocument\AA", vbDirectory) = "" Then MkDir "C:\MyDocument\AA"
 
Thaks a bunch!
-----Original Message-----
If Dir("C:\MyDocument\AA", vbDirectory) = "" Then MkDir "C:\MyDocument\AA"

--

Ken Snell
<MS ACCESS MVP>




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top