Background save to remote disk over VPN?

K

kiln

I'm programming with word 2000. I need to save a copy of the current doc
to a remote disk over VPN when the user clicks a custom toolbar button.
I've used ActiveDocument.SaveAs "\\remotepc\diskaddress\" and while it
does work it sort of ties up word for the duration. Is there a way to
accomplish the same task in the background, without making word slow
down for a minute?
 
K

kiln

Hi Perry, and thanks

I didn't mention it but that's the first thing that I tried. It seems to
produce a somewhat less locked up Word, but the code still takes a good
30 seconds before it completes the save and closes the doc (the next
call in line). Maybe there isn't any way to do what I need outside of
calling a separate program to send the file, but I hope there is.
 
P

Perry

There's one thing you cud like into:

Why not close the document, and use FileCopy instead?

Krgrds,
Perry
 
K

kiln

Thanks...I tried

ActiveDocument.Close
FileCopy strFilePath & strFileName, strRemotePath & strFileName

and the FileCopy never seems to execute. The code is in a separate
module, not normal.dot. I'm not very used to programming word, I'd have
expected the code to execute even if the doc is closed (you did too or
you'd not have suggested). I tried leaving word open, closing, etc, and
nothing happens. Placed a Stop command after the .close and never got
there. Not sure what I'm missing.
 
P

Perry

If the code is in the target document, you can't execute the FileCopy
when the document itself gets closed.
Can't come up with (elegant) alternatives on this one :-(
bsides:

increase the memory occupancy by VPN, and see whether this
has any effect.

Good luck...
Krgrds,
Perry
 
K

kiln

This is where I'm a bit muddy on word coding...the code isn't really
"in" the word doc that needs to be copied, it's in the custom template
that offers the toolbar...but apparently that amounts to the same thing.
 

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