Saving to two directories easily

  • Thread starter Thread starter Ed Still
  • Start date Start date
E

Ed Still

I want to be able to save documents easily to the My
Documents folder of my computer and to a network directory
(Z:). I have set up Z: to have the same directory
structure as My Documents, and I want the documents saved
into the correct directory of Z:.

For instance, I want to save "Letter1" to My
Documents/Larry/Correspondence and to
Z:/Larry/Correspondence -- and later save "Notes" to My
Documents/Curly and to Z:/Curly.

Either a macro that saves the document sequentially to My
Documents and Z: or a right-click function that saves
something already in My Documents to the same directory &
name in Z:.

Does anyone know of anything that could do this? (Back in
the day, I wrote a WordPerfect macro that could do this,
but I am not conversant with writing Word macros from
scratch.)
 
Jay,

Thanks for the link. I think what I need is something in
between what David Lett and Mark Baird suggested. In
pseudo-code, here is what I envision:

File Save As dialog opens
navigate to folder or sub-folder in My Documents ("Path")
enter file name ("Filename")
file is saved to c:/My documents/Path/Filename
file is saved a second time to Z:/Path/Filename
(An error condition will have to trap situations in which
Path does not exist on Z: and allow for a graceful exit or
correction)

Does that make sense?

Ed Still
 
Hi Ed,

Graham's macro will do the job. If you're worried about the possibility that
the backup location (Z:\Path in your example) doesn't exist, you can enhance
the macro either of two ways. To simply ignore the error, add this line
after the Dim statement"
On Error Resume Next
If you want to be notified and given the chance to pick another path, that's
possible but a bit more work than I have time for right now.

Notice that the macro does three saves. The first one updates the original
file with any changes you've made. The second one saves the backup copy. The
third one is necessary because the second save has made the backup location
the "current path" of the active document; it doesn't actually change the
file written by the first save, but it does return the "current path" to the
original location.
 

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

Back
Top