Eureka! How to delete/remove ~WRLxxxx.tmp/~WRL files in MS Word

G

Guest

First the answer, then the evidence and explanation. I'm using Word 2002, but
I expect this will work for at least some other versions.

Answer:

To get rid of ~WRLxxxx.tmp files, delete Word's Undo history, execute the
following in Word VBA

ActiveDocument.UndoClear

(repeat as necessary for open documents) and voila! All annoying files
disappear!

WARNING: obviously you have no undo history after doing this, so be sure you
know what you are doing.

Explanation: the kb article is wrong (I was previously more charitable,
suggesting it was "at best unclear" and only "at worst" actually wrong).

Problem causing the investigation: document directory filling up with these
..tmp files (why that's a problem for me is irrelevant).

Evidence: The knowledgebase kb says ~WRL is for "clipboard" material this
might also be true but it is misleadingly incomplete.

[I did understand that if the source file is closed, the WRL may be a copy
of the whole source because the clipboard claims to reference data, not hold
it... but since I am not copying and pasting between documents (only within
or from another non-MS app, particularly the Oxford English Dictionary), ~WRL
files should not be appearing for me according to the stated paradigm.]

With one document open and a number of ~WRL files lurking, I cleared the
clipboard (the clip pane showed 1 item whilst claiming "1 of 24", eh?); the
files were not released or deleted.

I did a proper test after closing this document, re-opening one and doing
some copying and pasting; no new ~WRL file appeared.

All possibly inconclusive... but wait!

I have created my own "improved" autosave functionality in VBA, which works
for files in designated locations by doing two consecutive saves and renaming
the .wbk file to an archive name (there is no SaveCopyAs functionality in
Word as there is in Excel, so this is a workaround).

With the clipboard empty, I made a trivial change, ran my autosave and hey
presto! a ~WRL appeared. This further contradicts the idea it's anything to
do with the clipboard because it was empty.

I then tried significantly expanding the file, from 5040 to 5085kB (remember
these figures!), by repeatedly copying and pasting random text. I then
cleared the clipboard and ran my autosave again and a new ~WRL file of 5040kB
appeared, i.e. *the size of the file before the 1st save*.

I then removed the 45kb insertion by deleting it and ran the custom
autosave, after which there was yet another new .tmp file of size *5085kB*.
Clue!

Inspired by this, inferring that the ~WRL file is a copy of the document
from which changes can be undone by reference, I executed
ActiveDocument.UndoClear and all the ~WRL files disappeared.

Since this has been a bane for so many people (I think MVP Suzanne Barnhill
has corresponded with many!) I hope this will help.

Julian
( MrWord 'at' ignorethisbitbutnotthenextword tiger2 'dot' demon 'dot' co
'dot' uk)
 
S

Suzanne S. Barnhill

That is indeed interesting. It has long bothered me that those files so
obviously had nothing to do with the Clipboard as far as I could see.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Julian said:
First the answer, then the evidence and explanation. I'm using Word 2002, but
I expect this will work for at least some other versions.

Answer:

To get rid of ~WRLxxxx.tmp files, delete Word's Undo history, execute the
following in Word VBA

ActiveDocument.UndoClear

(repeat as necessary for open documents) and voila! All annoying files
disappear!

WARNING: obviously you have no undo history after doing this, so be sure you
know what you are doing.

Explanation: the kb article is wrong (I was previously more charitable,
suggesting it was "at best unclear" and only "at worst" actually wrong).

Problem causing the investigation: document directory filling up with these
.tmp files (why that's a problem for me is irrelevant).

Evidence: The knowledgebase kb says ~WRL is for "clipboard" material this
might also be true but it is misleadingly incomplete.

[I did understand that if the source file is closed, the WRL may be a copy
of the whole source because the clipboard claims to reference data, not hold
it... but since I am not copying and pasting between documents (only within
or from another non-MS app, particularly the Oxford English Dictionary), ~WRL
files should not be appearing for me according to the stated paradigm.]

With one document open and a number of ~WRL files lurking, I cleared the
clipboard (the clip pane showed 1 item whilst claiming "1 of 24", eh?); the
files were not released or deleted.

I did a proper test after closing this document, re-opening one and doing
some copying and pasting; no new ~WRL file appeared.

All possibly inconclusive... but wait!

I have created my own "improved" autosave functionality in VBA, which works
for files in designated locations by doing two consecutive saves and renaming
the .wbk file to an archive name (there is no SaveCopyAs functionality in
Word as there is in Excel, so this is a workaround).

With the clipboard empty, I made a trivial change, ran my autosave and hey
presto! a ~WRL appeared. This further contradicts the idea it's anything to
do with the clipboard because it was empty.

I then tried significantly expanding the file, from 5040 to 5085kB (remember
these figures!), by repeatedly copying and pasting random text. I then
cleared the clipboard and ran my autosave again and a new ~WRL file of 5040kB
appeared, i.e. *the size of the file before the 1st save*.

I then removed the 45kb insertion by deleting it and ran the custom
autosave, after which there was yet another new .tmp file of size *5085kB*.
Clue!

Inspired by this, inferring that the ~WRL file is a copy of the document
from which changes can be undone by reference, I executed
ActiveDocument.UndoClear and all the ~WRL files disappeared.

Since this has been a bane for so many people (I think MVP Suzanne Barnhill
has corresponded with many!) I hope this will help.

Julian
( MrWord 'at' ignorethisbitbutnotthenextword tiger2 'dot' demon 'dot' co
'dot' uk)
 
G

Guest

One clarification - the files may not disappear until the document has been
saved following the UndoClear

[And there are some other circumstances in which some may remain: I have
seen a new "invisible" winword process appear in the Task Manager process
list - perhaps because of the way I use OnTime - and if this process owns the
tmp file it may persist... I think. Understanding this rare situation is now
a low priority for me; generally UndoClear seems to work well.]

Suzanne S. Barnhill said:
That is indeed interesting. It has long bothered me that those files so
obviously had nothing to do with the Clipboard as far as I could see.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Julian said:
First the answer, then the evidence and explanation. I'm using Word 2002, but
I expect this will work for at least some other versions.

Answer:

To get rid of ~WRLxxxx.tmp files, delete Word's Undo history, execute the
following in Word VBA

ActiveDocument.UndoClear

(repeat as necessary for open documents) and voila! All annoying files
disappear!

WARNING: obviously you have no undo history after doing this, so be sure you
know what you are doing.

Explanation: the kb article is wrong (I was previously more charitable,
suggesting it was "at best unclear" and only "at worst" actually wrong).

Problem causing the investigation: document directory filling up with these
.tmp files (why that's a problem for me is irrelevant).

Evidence: The knowledgebase kb says ~WRL is for "clipboard" material this
might also be true but it is misleadingly incomplete.

[I did understand that if the source file is closed, the WRL may be a copy
of the whole source because the clipboard claims to reference data, not hold
it... but since I am not copying and pasting between documents (only within
or from another non-MS app, particularly the Oxford English Dictionary), ~WRL
files should not be appearing for me according to the stated paradigm.]

With one document open and a number of ~WRL files lurking, I cleared the
clipboard (the clip pane showed 1 item whilst claiming "1 of 24", eh?); the
files were not released or deleted.

I did a proper test after closing this document, re-opening one and doing
some copying and pasting; no new ~WRL file appeared.

All possibly inconclusive... but wait!

I have created my own "improved" autosave functionality in VBA, which works
for files in designated locations by doing two consecutive saves and renaming
the .wbk file to an archive name (there is no SaveCopyAs functionality in
Word as there is in Excel, so this is a workaround).

With the clipboard empty, I made a trivial change, ran my autosave and hey
presto! a ~WRL appeared. This further contradicts the idea it's anything to
do with the clipboard because it was empty.

I then tried significantly expanding the file, from 5040 to 5085kB (remember
these figures!), by repeatedly copying and pasting random text. I then
cleared the clipboard and ran my autosave again and a new ~WRL file of 5040kB
appeared, i.e. *the size of the file before the 1st save*.

I then removed the 45kb insertion by deleting it and ran the custom
autosave, after which there was yet another new .tmp file of size *5085kB*.
Clue!

Inspired by this, inferring that the ~WRL file is a copy of the document
from which changes can be undone by reference, I executed
ActiveDocument.UndoClear and all the ~WRL files disappeared.

Since this has been a bane for so many people (I think MVP Suzanne Barnhill
has corresponded with many!) I hope this will help.

Julian
( MrWord 'at' ignorethisbitbutnotthenextword tiger2 'dot' demon 'dot' co
'dot' uk)
 

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