Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Problem using obj.Namespace(sourceFileName) Namespace(DestinationFilename).Itemsand then opening the xls file which creates a Temp Folder inside Temp

Hi Guys,

I have a strange Problem with my code.


My code zips the file from File Server and then opens and reads it in
excel application.


The code then opens the unzipped file in the Temp folder in the path given
above. I have given the code below.


Initially we were using winzip but now we are using windows shell
programming where the code is


obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items


Ideally this function needs to unzip the *.xls item in the Temp
folder.


Problem:


The above function using windows is also creating a Tempory Folder
inside Temp with New name and then


pasting the *.xls inside it.


This was not happening when we were using winzip.


The problem is i first get the zipped file from server to Temp using
some method, then i try and unzip it using

obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items

the file is copied or unzipped to the Temp folder

now i try to use the function having the code like

if filedownloaded = true
wasFDownloaded = True
If openBookF = True Then


On Error Resume Next
Set filedownload = Application.Workbooks.Open
(filename:=localFilename, ReadOnly:=True, _

AddToMru:=False) /////This line then creates a Temporary folder 1
and ////places xls file in zipfile again which was not happening
before
On Error GoTo 0

Else

filedownloaded = localFilename

End If

End If

I want to avoid the creation of temp folder:

The parameters used in this line of code
obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items

cannot avoid the creation of same file inside TemporaryFiolder 1, but
i want my application to open the file which is already in the Temp
copied but not create a Folder with Temporary Folder1 name everytime
it tries and open the file unzipped using the above two code.

Any help and iseas will be appreciated.

Regards,

Yuvraj
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Problem using obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items and then opening the xls file which creates a Temp Folder inside Temp

See my reply in your other thread

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Yuvraj" wrote in message ...
Hi Guys,


I have a strange Problem with my code.


My code zips the file from File Server and then opens and reads it in
excel application.


The code then opens the unzipped file in the Temp folder in the path given
above. I have given the code below.


Initially we were using winzip but now we are using windows shell
programming where the code is


obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items


Ideally this function needs to unzip the *.xls item in the Temp
folder.


Problem:


The above function using windows is also creating a Tempory Folder
inside Temp with New name and then


pasting the *.xls inside it.


This was not happening when we were using winzip.


The problem is i first get the zipped file from server to Temp using
some method, then i try and unzip it using

obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items

the file is copied or unzipped to the Temp folder

now i try to use the function having the code like

if filedownloaded = true
wasFDownloaded = True
If openBookF = True Then


On Error Resume Next
Set filedownload = Application.Workbooks.Open
(filename:=localFilename, ReadOnly:=True, _

AddToMru:=False) /////This line then creates a Temporary folder 1
and ////places xls file in zipfile again which was not happening
before
On Error GoTo 0

Else

filedownloaded = localFilename

End If

End If

I want to avoid the creation of temp folder:

The parameters used in this line of code
obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items

cannot avoid the creation of same file inside TemporaryFiolder 1, but
i want my application to open the file which is already in the Temp
copied but not create a Folder with Temporary Folder1 name everytime
it tries and open the file unzipped using the above two code.

Any help and iseas will be appreciated.

Regards,

Yuvraj

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Problem using obj.Namespace(sourceFileName) Namespace(DestinationFilename).Itemsand then opening the xls file which creates a Temp Folder inside Temp

On May 2, 10:53*pm, "Ron de Bruin" wrote:
See my reply in your other thread

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"Yuvraj" wrote in ...
Hi Guys,


I have a strange Problem with my code.


My code zips the file from File Server and then opens and reads it in
excel application.


The code then opens the unzipped file in the Temp folder in the path given
above. I have given the code below.


Initially we were using winzip but now we are using windows shell
programming where the code is


obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items


Ideally this function needs to unzip the *.xls item in the Temp
folder.


Problem:


The above function using windows is also creating a Tempory Folder
inside Temp with New name and then


pasting the *.xls inside it.


This was not happening when we were using winzip.


The problem is i first get the zipped file from server to Temp using
some method, then i try and unzip it using


obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items


the file is copied or unzipped to the Temp folder


now i try to use the function having the code like


if filedownloaded = true
* * * *wasFDownloaded = True
* * * *If openBookF = True Then


* * * * * *On Error Resume Next
* * * * * * * *Set filedownload = Application.Workbooks.Open
(filename:=localFilename, ReadOnly:=True, _


AddToMru:=False) /////This line then creates a Temporary folder 1
and ////places xls file in zipfile again which was not happening
before
* * * * * *On Error GoTo 0


* * * *Else


* * * * * *filedownloaded = localFilename


* * * *End If


* *End If


I want to avoid the creation of temp folder:


The parameters used in this line of code
obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items


cannot avoid the creation of same file inside TemporaryFiolder 1, but
i want my application to open the file which is already in the Temp
copied but not create a Folder with Temporary Folder1 name everytime
it tries and open the file unzipped using the above two code.


Any help and iseas will be appreciated.


Regards,


Yuvraj- Hide quoted text -


- Show quoted text -


Thanx Ron,

I have already used that code.

Only difference is I am unzipping all the zipped files in my Temp
folder.

But when I am trying to open the zipped files using.

On Error Resume Next
Set filedownload = Application.Workbooks.Open
(filename:=localFilename, ReadOnly:=True, _


AddToMru:=False)


Here localFilename=Temp/
xxxx.zip and Temp= C:
\Document~1\Name\LocalSettiongs\Temp\

I have already unzipped the xxxx.zip and the file inside xxxx.zip is
abcd.xls

When I use the above code where localFilename=Temp/xxxx.zip it used
to open abcd.xls directly. But after we are not using Winzip and
using the code to unzip the zipped file and use the same code to open
the file inside xxxx.zip the abcd.xls inside xxxx.zip and the
abcd.xls which is outside after we have unzipped is not pointing to
the same thing hence when I use the above code it is making a
Temporary folder when we try to open abcd.xls inside xxxx.zip.

The requirement is like this hence we cannot change this but why it is
forming temporary folder when it was not while using Winzip

Regards,

Yuvraj


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Problem using obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items and then opening the xls file which creates a Temp Folder inside Temp

De code on my site is not supprted by Microsoft so it is not strange
that it not work the same as code for WinZip.
You can Shell WinZip so this is always a better option if you can use it.

Test the code on my site and if you have problems let me know
http://www.rondebruin.nl/windowsxpunzip.htm

I have winZip code also on my site

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Yuvraj" wrote in message ...
On May 2, 10:53 pm, "Ron de Bruin" wrote:
See my reply in your other thread

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"Yuvraj" wrote in ...
Hi Guys,


I have a strange Problem with my code.


My code zips the file from File Server and then opens and reads it in
excel application.


The code then opens the unzipped file in the Temp folder in the path given
above. I have given the code below.


Initially we were using winzip but now we are using windows shell
programming where the code is


obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items


Ideally this function needs to unzip the *.xls item in the Temp
folder.


Problem:


The above function using windows is also creating a Tempory Folder
inside Temp with New name and then


pasting the *.xls inside it.


This was not happening when we were using winzip.


The problem is i first get the zipped file from server to Temp using
some method, then i try and unzip it using


obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items


the file is copied or unzipped to the Temp folder


now i try to use the function having the code like


if filedownloaded = true
wasFDownloaded = True
If openBookF = True Then


On Error Resume Next
Set filedownload = Application.Workbooks.Open
(filename:=localFilename, ReadOnly:=True, _


AddToMru:=False) /////This line then creates a Temporary folder 1
and ////places xls file in zipfile again which was not happening
before
On Error GoTo 0


Else


filedownloaded = localFilename


End If


End If


I want to avoid the creation of temp folder:


The parameters used in this line of code
obj.Namespace(sourceFileName) Namespace(DestinationFilename).Items


cannot avoid the creation of same file inside TemporaryFiolder 1, but
i want my application to open the file which is already in the Temp
copied but not create a Folder with Temporary Folder1 name everytime
it tries and open the file unzipped using the above two code.


Any help and iseas will be appreciated.


Regards,


Yuvraj- Hide quoted text -


- Show quoted text -


Thanx Ron,

I have already used that code.

Only difference is I am unzipping all the zipped files in my Temp
folder.

But when I am trying to open the zipped files using.

On Error Resume Next
Set filedownload = Application.Workbooks.Open
(filename:=localFilename, ReadOnly:=True, _


AddToMru:=False)


Here localFilename=Temp/
xxxx.zip and Temp= C:
\Document~1\Name\LocalSettiongs\Temp\

I have already unzipped the xxxx.zip and the file inside xxxx.zip is
abcd.xls

When I use the above code where localFilename=Temp/xxxx.zip it used
to open abcd.xls directly. But after we are not using Winzip and
using the code to unzip the zipped file and use the same code to open
the file inside xxxx.zip the abcd.xls inside xxxx.zip and the
abcd.xls which is outside after we have unzipped is not pointing to
the same thing hence when I use the above code it is making a
Temporary folder when we try to open abcd.xls inside xxxx.zip.

The requirement is like this hence we cannot change this but why it is
forming temporary folder when it was not while using Winzip

Regards,

Yuvraj


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
excel creates multiple temp files when saving westbrom Excel Discussion (Misc queries) 7 September 25th 13 04:09 PM
Why does Office always save my file in a temp folder? Help Save Work Easier Excel Discussion (Misc queries) 1 September 30th 07 10:39 PM
Temp files on LAN file Lp12 Excel Discussion (Misc queries) 0 July 18th 06 07:45 AM
delete all the contents (sub folders and files) in the temp folder Joseph Excel Discussion (Misc queries) 0 June 6th 05 08:01 AM
Location of Temp File(s) - If any RWN Excel Discussion (Misc queries) 11 January 5th 05 10:21 PM


All times are GMT +1. The time now is 08:35 AM.

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

About Us

"It's about Microsoft Excel"