Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
DarrenWood
 
Posts: n/a
Default number "1" added to filename


When i open a spreadsheet that has been sent to me in an e mail instead
of it opening in excel with the same filename as it was recorded in the
e mail it adds a "1" to the end.

So file "expenses" becomes "expenses1"

Anyone know if you can stop this happening ?

Thanks

Darren


--
DarrenWood
------------------------------------------------------------------------
DarrenWood's Profile: http://www.excelforum.com/member.php...o&userid=16460
View this thread: http://www.excelforum.com/showthread...hreadid=383664

  #2   Report Post  
swatsp0p
 
Posts: n/a
Default


My guess is that your email program is altering the file name, not
Excel. Try saving the file from the email and open it from the saved
location.

Does that solve the problem?

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=383664

  #3   Report Post  
DarrenWood
 
Posts: n/a
Default


Yes Bruce you are right, that does get around the problem, it is just a
pain in the rear !!

There must be a way around it to stop this happening, any ideas anyone?


--
DarrenWood
------------------------------------------------------------------------
DarrenWood's Profile: http://www.excelforum.com/member.php...o&userid=16460
View this thread: http://www.excelforum.com/showthread...hreadid=383664

  #4   Report Post  
bj
 
Posts: n/a
Default

The E-mail file may be a template


"DarrenWood" wrote:


When i open a spreadsheet that has been sent to me in an e mail instead
of it opening in excel with the same filename as it was recorded in the
e mail it adds a "1" to the end.

So file "expenses" becomes "expenses1"

Anyone know if you can stop this happening ?

Thanks

Darren


--
DarrenWood
------------------------------------------------------------------------
DarrenWood's Profile: http://www.excelforum.com/member.php...o&userid=16460
View this thread: http://www.excelforum.com/showthread...hreadid=383664


  #5   Report Post  
DarrenWood
 
Posts: n/a
Default


Ok, it might be a template but can you expand on that,

how do i know if it is ? and if it is how do i stop it renaming itself
?

Thanks


--
DarrenWood
------------------------------------------------------------------------
DarrenWood's Profile: http://www.excelforum.com/member.php...o&userid=16460
View this thread: http://www.excelforum.com/showthread...hreadid=383664



  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default

Find out where that email program stores its attachments.

=cell("filename",a1)

should show you.

Then clean that up every so often.

(I'm guessing that the number gets added when the email program finds an
existing file of the same name.)

DarrenWood wrote:

Yes Bruce you are right, that does get around the problem, it is just a
pain in the rear !!

There must be a way around it to stop this happening, any ideas anyone?

--
DarrenWood
------------------------------------------------------------------------
DarrenWood's Profile: http://www.excelforum.com/member.php...o&userid=16460
View this thread: http://www.excelforum.com/showthread...hreadid=383664


--

Dave Peterson
  #7   Report Post  
DarrenWood
 
Posts: n/a
Default


Hi Dave

Your spot on. If I open the e mail that has the file in and then open
the file this opens up ok in excel with the correct file name.

However if after this i then close the e mail which contains the saved
file whilst the file is still open in excel you get the normal reminder
"A program still has the file attachemnt " ".xls opem. changes to
this doc................."

If you then close the excel spreadsheet and then reopen outlook and
try to reopen the file this is when it gets renamed, and as you say if
you search on the file name it is in the C drive temp folder.

I assume this temp folder is cleared each time the pc is shut down,
however any thoughts on how i could stop the file being stored in the
temp folder after i shut down the e mail containing the file ?


--
DarrenWood
------------------------------------------------------------------------
DarrenWood's Profile: http://www.excelforum.com/member.php...o&userid=16460
View this thread: http://www.excelforum.com/showthread...hreadid=383664

  #8   Report Post  
Dave Peterson
 
Posts: n/a
Default

The files in the temp folder are deleted by the program that created them -- if
that program can and if that program is nice.

But not all files can be deleted (like when you close the email program before
closing the workbook in excel) and not all programs are nice.

I have a VBS script in a folder and a shortcut to it on my desktop.

Since there are lots of programs that fail to clean up after themselves, I like
to run it on demand--either right when I turn on the pc or right before I shut
it off.

It was written by Michael Harris:
http://groups.google.com/groups?thre...%40tkmsftngp02





DarrenWood wrote:

Hi Dave

Your spot on. If I open the e mail that has the file in and then open
the file this opens up ok in excel with the correct file name.

However if after this i then close the e mail which contains the saved
file whilst the file is still open in excel you get the normal reminder
"A program still has the file attachemnt " ".xls opem. changes to
this doc................."

If you then close the excel spreadsheet and then reopen outlook and
try to reopen the file this is when it gets renamed, and as you say if
you search on the file name it is in the C drive temp folder.

I assume this temp folder is cleared each time the pc is shut down,
however any thoughts on how i could stop the file being stored in the
temp folder after i shut down the e mail containing the file ?

--
DarrenWood
------------------------------------------------------------------------
DarrenWood's Profile: http://www.excelforum.com/member.php...o&userid=16460
View this thread: http://www.excelforum.com/showthread...hreadid=383664


--

Dave Peterson
  #9   Report Post  
Dave Peterson
 
Posts: n/a
Default

Does the attachment have a .xls extension or a .xlt extension.

If it has a .xlt extension, then it's probably a template. Excel will use that
for the basis of a new workbook.



DarrenWood wrote:

Ok, it might be a template but can you expand on that,

how do i know if it is ? and if it is how do i stop it renaming itself
?

Thanks

--
DarrenWood
------------------------------------------------------------------------
DarrenWood's Profile: http://www.excelforum.com/member.php...o&userid=16460
View this thread: http://www.excelforum.com/showthread...hreadid=383664


--

Dave Peterson
  #10   Report Post  
DarrenWood
 
Posts: n/a
Default


Mike

I tried using the code in the link you provided to clear out the temp
file.

Each time in run the code it stops at

redim preserve arfiles(count)

and gives the error message 'Compile error variable not defined'

any ideas?

Thanks

Darren


--
DarrenWood
------------------------------------------------------------------------
DarrenWood's Profile: http://www.excelforum.com/member.php...o&userid=16460
View this thread: http://www.excelforum.com/showthread...hreadid=383664



  #11   Report Post  
Dave Peterson
 
Posts: n/a
Default

Mike?

That link to the .vbs code is not used in excel's VBA.

Open NotePad
copy Michael Harris's code there.
Save it as
deletetempfiles.vbs
(in a nice safe subfolder)

create a shortcut on your desktop to that .vbs file and double click on the
shortcut.

DarrenWood wrote:

Mike

I tried using the code in the link you provided to clear out the temp
file.

Each time in run the code it stops at

redim preserve arfiles(count)

and gives the error message 'Compile error variable not defined'

any ideas?

Thanks

Darren

--
DarrenWood
------------------------------------------------------------------------
DarrenWood's Profile: http://www.excelforum.com/member.php...o&userid=16460
View this thread: http://www.excelforum.com/showthread...hreadid=383664


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula for current month minus one = Quarter number in a macro. Pank Excel Discussion (Misc queries) 11 June 22nd 05 02:47 PM
doubling a number X number of times Bob Excel Worksheet Functions 1 June 17th 05 12:54 AM
Count Number of Characters in a cell? AHJuncti Excel Discussion (Misc queries) 2 June 16th 05 07:39 PM
Need number of Saturdays and number of Sundays between 2 dates Class316 Excel Worksheet Functions 1 June 10th 05 02:47 AM
How to format a number in Indian style in Excel? Victor_alb Excel Discussion (Misc queries) 2 December 21st 04 04:21 AM


All times are GMT +1. The time now is 06:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"