PC Review


Reply
Thread Tools Rate Thread

Create temp file in users temp directory

 
 
Adrian
Guest
Posts: n/a
 
      26th Jan 2005
Access 2000

We currently email snapshot reports using an SMTP mailer

We want to change the SMTP mailer we use, but the one we are currently using
will generate a temporary filename in the relevant users local directory,
and the snapshot report is saved to this name before being sent as an
attachment. Something like:

strFilename = SMTPMailer.tempfilename ' for example "C:\Documents and
Settings\Adrian.Domain\Local Settings\Temp\2\TMPAE.tmp"
strFilename = Mid$(strFilename, 1, Len(strFilename) - 4) & ".snp" '
"C:\Documents and Settings\Adrian.Domain\Local Settings\Temp\2\TMPAE.snp"

DoCmd.OutputTo acOutputReport, rptToGo, acFormatSNP, strFilename, False

I would welcome any suggestions as to how to produce a temporary file name
in the users local directory such as "C:\Documents and
Settings\Adrian.Domain\Local Settings\Temp\2\TMPAE.tmp"

Thanks for any help.

Adrian



 
Reply With Quote
 
 
 
 
Adrian
Guest
Posts: n/a
 
      28th Jan 2005
Found answer at Dev Ashish's web site
http://www.mvps.org/access/api/api0014.htm

"Adrian" <(E-Mail Removed)> wrote in message
news:uq%(E-Mail Removed)...
> Access 2000
>
> We currently email snapshot reports using an SMTP mailer
>
> We want to change the SMTP mailer we use, but the one we are currently

using
> will generate a temporary filename in the relevant users local directory,
> and the snapshot report is saved to this name before being sent as an
> attachment. Something like:
>
> strFilename = SMTPMailer.tempfilename ' for example "C:\Documents and
> Settings\Adrian.Domain\Local Settings\Temp\2\TMPAE.tmp"
> strFilename = Mid$(strFilename, 1, Len(strFilename) - 4) & ".snp" '
> "C:\Documents and Settings\Adrian.Domain\Local Settings\Temp\2\TMPAE.snp"
>
> DoCmd.OutputTo acOutputReport, rptToGo, acFormatSNP, strFilename, False
>
> I would welcome any suggestions as to how to produce a temporary file name
> in the users local directory such as "C:\Documents and
> Settings\Adrian.Domain\Local Settings\Temp\2\TMPAE.tmp"
>
> Thanks for any help.
>
> Adrian
>
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Temp files in User's Temp Directory shubhishubhi Windows XP General 2 2nd Jun 2008 10:31 PM
Using the windows\temp folder for programs? (or use what temp directory in its place)? Bill in Co. Windows XP General 10 25th Jan 2008 04:30 AM
How do I create a temp directory? Texasmommyx3 Windows XP Help 1 17th Oct 2007 06:35 PM
%temp% points to %systemroot%\temp instead of %userprofile%\LocalS~1\temp Gordon Fecyk Windows XP Security 6 28th Mar 2005 09:53 PM
How to Create a Writeable Temp Copy of a Table, Then Add the Recs to Temp, & Write to Orig Mike Thomas Microsoft Access Form Coding 2 17th Dec 2004 03:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:32 PM.