Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel 2002 and the .emf files

I have a program that starts an instance of Excel 2002, creates a
spreadsheet, prints it, and closes. It does this roughly 400 times a day.
As you can imagine, this means that a lot of .emf files are going to be
created by Excel, and this can fill up a hard drive if left unchecked. Is
there a way to keep Excel from creating these files?

Thanks.
Joshua


  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Excel 2002 and the .emf files


I assume you mean the EMF files generated by excel
in the temp folder?

These files are generated only/mostly?
for embedded controls on worksheets.

So your code may create sheets with embedded controls?


Either:
get rid of the embedded controls and replace
with native controls from the form toolbar.


close excel properly when your routine finishes.
when excel is closed (not Terminiated via API)
it should (and normally does) clear up any
mess left in the temp dir.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Joshua Campbell" wrote:

I have a program that starts an instance of Excel 2002, creates a
spreadsheet, prints it, and closes. It does this roughly 400 times a
day. As you can imagine, this means that a lot of .emf files are going
to be created by Excel, and this can fill up a hard drive if left
unchecked. Is there a way to keep Excel from creating these files?

Thanks.
Joshua




  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel 2002 and the .emf files

Yes, in the TEMP folder. Sorry for not being specific.

To the best of my knowledge, I am not creating any embedded controls.

In my VB.NET app, I have the following commands:
xlbook.Close(False)
xlapp.Quit()
'Release the references we have

System.Runtime.InteropServices.Marshal.ReleaseComO bject(xlsheet)

System.Runtime.InteropServices.Marshal.ReleaseComO bject(xlbook)

System.Runtime.InteropServices.Marshal.ReleaseComO bject(xlapp)

Did I not close something properly?




"keepITcool" wrote in message
...

I assume you mean the EMF files generated by excel
in the temp folder?

These files are generated only/mostly?
for embedded controls on worksheets.

So your code may create sheets with embedded controls?


Either:
get rid of the embedded controls and replace
with native controls from the form toolbar.


close excel properly when your routine finishes.
when excel is closed (not Terminiated via API)
it should (and normally does) clear up any
mess left in the temp dir.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Joshua Campbell" wrote:

I have a program that starts an instance of Excel 2002, creates a
spreadsheet, prints it, and closes. It does this roughly 400 times a
day. As you can imagine, this means that a lot of .emf files are going
to be created by Excel, and this can fill up a hard drive if left
unchecked. Is there a way to keep Excel from creating these files?

Thanks.
Joshua






  #4   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Excel 2002 and the .emf files

I'm an old VBA hack and I haven't yet found it necessary to
migrate to .Net interops etc. <g

although your code makes sense to me..



I'd test following:

clean the temp.
run your code.
check the temp.. and open the emf files to see what they are..
(and check that they are in fact generated by your code...


that's it for me..





keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Joshua Campbell" wrote:

Yes, in the TEMP folder. Sorry for not being specific.

To the best of my knowledge, I am not creating any embedded controls.

In my VB.NET app, I have the following commands:
xlbook.Close(False)
xlapp.Quit()
'Release the references we have

System.Runtime.InteropServices.Marshal.ReleaseComO bject(xlsheet)

System.Runtime.InteropServices.Marshal.ReleaseComO bject(xlbook)

System.Runtime.InteropServices.Marshal.ReleaseComO bject(xlapp)

Did I not close something properly?




"keepITcool" wrote in message
...

I assume you mean the EMF files generated by excel
in the temp folder?

These files are generated only/mostly?
for embedded controls on worksheets.

So your code may create sheets with embedded controls?


Either:
get rid of the embedded controls and replace
with native controls from the form toolbar.


close excel properly when your routine finishes.
when excel is closed (not Terminiated via API)
it should (and normally does) clear up any
mess left in the temp dir.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Joshua Campbell" wrote:

I have a program that starts an instance of Excel 2002, creates a
spreadsheet, prints it, and closes. It does this roughly 400 times

a
day. As you can imagine, this means that a lot of .emf files are

going
to be created by Excel, and this can fill up a hard drive if left
unchecked. Is there a way to keep Excel from creating these files?

Thanks.
Joshua








  #5   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel 2002 and the .emf files

Apparently, the problem does lie in bad code. My code basically puts data
from an array into various cells, gives the worksheet a background, prints
the sheet, and closes. The mso*.emf file that is left is a copy of the
background image. Weird. Oh well. I'll probably just create a scheduled
task then to delete these files on a regular basis.

Thanks for your help!
Joshua


"keepITcool" wrote in message
...
I'm an old VBA hack and I haven't yet found it necessary to
migrate to .Net interops etc. <g

although your code makes sense to me..



I'd test following:

clean the temp.
run your code.
check the temp.. and open the emf files to see what they are..
(and check that they are in fact generated by your code...


that's it for me..





keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Joshua Campbell" wrote:

Yes, in the TEMP folder. Sorry for not being specific.

To the best of my knowledge, I am not creating any embedded controls.

In my VB.NET app, I have the following commands:
xlbook.Close(False)
xlapp.Quit()
'Release the references we have

System.Runtime.InteropServices.Marshal.ReleaseComO bject(xlsheet)

System.Runtime.InteropServices.Marshal.ReleaseComO bject(xlbook)

System.Runtime.InteropServices.Marshal.ReleaseComO bject(xlapp)

Did I not close something properly?




"keepITcool" wrote in message
...

I assume you mean the EMF files generated by excel
in the temp folder?

These files are generated only/mostly?
for embedded controls on worksheets.

So your code may create sheets with embedded controls?


Either:
get rid of the embedded controls and replace
with native controls from the form toolbar.


close excel properly when your routine finishes.
when excel is closed (not Terminiated via API)
it should (and normally does) clear up any
mess left in the temp dir.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Joshua Campbell" wrote:

I have a program that starts an instance of Excel 2002, creates a
spreadsheet, prints it, and closes. It does this roughly 400 times

a
day. As you can imagine, this means that a lot of .emf files are

going
to be created by Excel, and this can fill up a hard drive if left
unchecked. Is there a way to keep Excel from creating these files?

Thanks.
Joshua












  #6   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Excel 2002 and the .emf files

I use this VBS script to clean up my Temp folder on demand. I have a shortcut
to the script on my desktop.

http://groups.google.com/groups?thre...%40tkmsftngp02



Joshua Campbell wrote:

Apparently, the problem does lie in bad code. My code basically puts data
from an array into various cells, gives the worksheet a background, prints
the sheet, and closes. The mso*.emf file that is left is a copy of the
background image. Weird. Oh well. I'll probably just create a scheduled
task then to delete these files on a regular basis.

Thanks for your help!
Joshua

"keepITcool" wrote in message
...
I'm an old VBA hack and I haven't yet found it necessary to
migrate to .Net interops etc. <g

although your code makes sense to me..



I'd test following:

clean the temp.
run your code.
check the temp.. and open the emf files to see what they are..
(and check that they are in fact generated by your code...


that's it for me..





keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Joshua Campbell" wrote:

Yes, in the TEMP folder. Sorry for not being specific.

To the best of my knowledge, I am not creating any embedded controls.

In my VB.NET app, I have the following commands:
xlbook.Close(False)
xlapp.Quit()
'Release the references we have

System.Runtime.InteropServices.Marshal.ReleaseComO bject(xlsheet)

System.Runtime.InteropServices.Marshal.ReleaseComO bject(xlbook)

System.Runtime.InteropServices.Marshal.ReleaseComO bject(xlapp)

Did I not close something properly?




"keepITcool" wrote in message
...

I assume you mean the EMF files generated by excel
in the temp folder?

These files are generated only/mostly?
for embedded controls on worksheets.

So your code may create sheets with embedded controls?


Either:
get rid of the embedded controls and replace
with native controls from the form toolbar.


close excel properly when your routine finishes.
when excel is closed (not Terminiated via API)
it should (and normally does) clear up any
mess left in the temp dir.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Joshua Campbell" wrote:

I have a program that starts an instance of Excel 2002, creates a
spreadsheet, prints it, and closes. It does this roughly 400 times

a
day. As you can imagine, this means that a lot of .emf files are

going
to be created by Excel, and this can fill up a hard drive if left
unchecked. Is there a way to keep Excel from creating these files?

Thanks.
Joshua









--

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
Excel 2002: Can I save all files in one go without exiting ? Mr. Low Excel Discussion (Misc queries) 0 July 6th 07 04:26 PM
Excel 2002 : Unable to open files in MS Outlook 2002 Mr. Low Excel Discussion (Misc queries) 1 June 29th 07 02:12 PM
Files saved in excel 2002 create_share Excel Discussion (Misc queries) 1 November 18th 06 02:49 PM
corrupt Excel 2000/2002 files Ohio Doug Excel Discussion (Misc queries) 0 November 21st 05 03:35 PM
Excel 2002 files attached to Outlook 2002 EMails change size AJStadlin Excel Programming 1 October 15th 03 12:12 AM


All times are GMT +1. The time now is 02:30 PM.

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"