View Single Post
  #4   Report Post  
Pat Garard
 
Posts: n/a
Default

G'Day Teri,

The Macro language for Office is Visual Basic for Applications
and it still supports the "Kill" statement - an ancient leftover from
the dim and distant past.

IF
all the files can be in the same folder
THEN
the following macro will do the job
END IF
====
Sub DeleteAll()
Dim KillFilePath As String
KillFilePath = "D:\My Documents\Test\*.*"
Kill KillFilePath
MsgBox KillFilePath & vbCrLf & "all files were deleted!"
End Sub
====
Change the folder path of KillFilePath to suit, and you may
also change "*.*" to "*.doc" - but only if you need to.

"*.*" will clean up any temporary files that might get left
over in the event of Word misbehaving.

If there are no files, you will get a non-trappable error
that says "File not found" (press Cancel).

Test it and, better yet, get your colleagues to test it with
and without files.
--
Regards,
Pat Garard
Australia
_______________________

"Teri D MT" wrote in message
...
Hello! I am trying to help some of my coworkers learn to use Word. Since
we
type medical info, we are not allowed to keep patient information on our
computers (we work at home for a hospital). I would like to make a macro
that we could run that would automatically find and delete all the
dictation
that we typed that day so that it will not stay in our computers. I
myself
of course know how to delete files manually, but some of the newer users
are
petrified of trying anything, so I'd like to make them a macro to do it
for
them until they get a little more used to Word. Thank you for any help.
--
Teri D MT