Hi,
I'm trying to overwrite a .dot file in the Startup directory. I've tried
using
FileCopy Source:=sSource, Destination:=sDestination
WordBasic.CopyFileA FileName:=sSource, Directory:=sDestination
However, because the file is in the Startup directory and, therefore, in
use, I get a permission error. I even tried a Kill statement before copying
the file to the new destination.
I've read the article "Distributing macros to other users" at
http://word.mvps.org/faqs/macrosvba/DistributeMacros.htm, and I'm
investigating this with my IT department. Are there other solutions? Is it
possible to overwrite a .dot file in the Startup directory?
Thanks in advance,
Dave
Tony Jollans - 06 Oct 2006 20:03 GMT
Hi Dave,
Close it first. Then you should be able to do what you want. Then open it
again.
AddIns(sDestination).Installed = False
Kill sDestination
FileCopy sSource, sDestination
AddIns(sDestination).Installed = True
--
Enjoy,
Tony
> Hi,
>
[quoted text clipped - 16 lines]
>
> Dave