code to copy files

Z

zSplash

MyAddin is stored on a server, but is copied to an Addin directory on each
PC. I want to be able to copy MyAddin using VBA code, but when I try to do
it using the VB editor, everything I do when I minimize the Word app is
"ignored". (I always cheat and use the editor to "get the hang" of what I'm
trying to code.)

In olden times, I woulda written a shell script, made it executable, and
then just executed it. Can I do something similarly in VBA code?

TIA
 
H

Helmut Weber

Hi,
why not using a simple bat-file in your autostart folder,
if you know how to write one?
Don't know, whether trying to copy an addin is a good
idea, as the target addin, that should probably be
overwritten, may be in use.
Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
Word 97, W98
 
Z

zSplash

That's a good idea. I will try it. I can delete the old addin, which won't
be in use at startup, and then copy the new addin.

Thanks for your help, Helmut.

st.
 
Z

zSplash

Good advice, Helmut. I did as you said, and including copying the addin to
another directory, so that the target addin will never be "in use". Your
help is certainly appreciated.

st.
 
C

Charles Kenyon

This is better done in the (Windows?) network login script. That will be
executed before Word is loaded. Put your Add-In in a network folder (not the
Workgroup Templates folder!) to which users have read-only access. The
script should automatically copy it to the local startup folder each time
the user logs into the network - if the network copy is newer than the
stored copy. I don't know how to write these scripts, just know they exist.
In a batch file, the DOS XCOPY or XXCOPY commands can handle this easily.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

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