"Ghost" doc icon after macro?

E

Ed

I have Win2000 and Word2000. I run a macro which opens a large document (a
3800 page .TXT file) and separates it into several smaller files. (Thank
you, Jay Freedman!!) Because it takes an hour and a half to run, I start it
when I'm leaving work. The last lines of my code are

' shut down the original
SourceDoc.Close savechanges:=wdDoNotSaveChanges

' Close PathDoc
PathDoc.Close savechanges:=wdDoNotSaveChanges

' Quit Word
Word.Application.Quit

End Sub

This starts at about 4:30, and a shut-down program shuts off the computer at
about 7:30 - long after the macro ahs stopped. (PathDoc, which is created
by the macro, was created last night at 4:27, and Last Modification was
5:57.) So I'm assuming all docs are closed and Word has quit. But the last
two times I have run this, I have a "ghost" icon of the original - SourceDoc
in the macro - with the tilde in the name (~073003.txt). The "ghost" is
about 620kb, while the original (which is fully intact) is 8.47Mb.

Is this something I need to be concerned with?

Ed
 
J

Jay Freedman

Hi, Ed,

Files with names that start with a tilde are temporary files (see
http://support.microsoft.com/default.aspx?scid=211632). Word is supposed to
delete them when it closes, but it's infamous for leaving them stranded.

As long as Word is shut down, there's no reason you can't just delete temp
files. Some people use a batch file in the Windows startup group to clear
them out.
 
E

Ed

Thanks, Jay. I didn't know if this was caused by some type of error that I
don't know about because this runs after I go home. But I can breathe
easier now! 8>)

Ed
 
L

Laurent

in
microsoft.public.word.vba.beginners
I have Win2000 and Word2000. I run a macro which opens a large
document (a 3800 page .TXT file) and separates it into several smaller
files.

Long long time ago, I ran into a similar challenge. I had bibliographical
references from CD databases that were output in huge single txt file, and
I needed on the contrary to have each reference in its own file.

I wrote a small QuickBasic utility that could split any TXT file into a
number of smaller files, the division being based on a string given by
user. It fullfilled my needs at that time and it's was a fun project to
learn Quickbasic.

The utility is not 100% perfect. I stopped its development at early beta
stage, but it's free, it's fast (DOS based), it's small and it comes with
source code because I put it into public domain. Tell me if you want me to
sent it. It's a 50K zip.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top