PDA

View Full Version : Solved: understand a file is open from a zip folder



ALe
11-11-2005, 03:48 AM
Hi everybody.

I want to understand if a file (excel file) is opened by a folder that is compressed. Is there any way?

Thanks

mdmackillop
11-11-2005, 07:01 AM
You could try the following, which will probably show a temporary folder path such as
C:\Documents and Settings\malcolm\Local Settings\Temp\Temporary Directory 1 for Checkboxes[1].zip
MsgBox ActiveWorkbook.Path

ALe
11-11-2005, 07:31 AM
Good. Do you think I can assume that a file opened from a zip folder has always the word "Temp" in its path, whatever the version of Windows?

Killian
11-11-2005, 07:47 AM
For Windows compressed folders, I believe a more definitive test would be for ".zip" in the path.
This won't be the case for Windows versions without this feature, opening ZIP files with a 3rd party utility (WinZip, etc). These normally extract the file to a temp folder defined in the utility's settings, rather than seeing the zip file as a folder.

ALe
11-11-2005, 07:49 AM
Ok. Thank you very much!