+ Reply to Thread
Results 1 to 6 of 6

request macro to save file to multiple, separate locations

  1. #1
    Joseph Spain
    Guest

    request macro to save file to multiple, separate locations

    Hi,

    I would like to request a macro that can do the following tasks:

    1. check to see if three specific network paths are available
    2. save to all of the network paths that are available, without
    generating errors (or messages) for the paths that are not available

    Any ideas? Hopefully, someone already has written such a macro.

    As always, thanks very much for your assistance and suggestions

    Best regards,
    Joseph




  2. #2
    Vasant Nanavati
    Guest

    Re: request macro to save file to multiple, separate locations

    Untested since I'm not networked right now:

    Sub SaveToAllPaths(strPath1 As String, strPath2 As String, strPath3 As
    String)
    On Error Resume Next
    With ThisWorkbook
    .SaveAs strPath1 & "\" & .Name
    .SaveAs strPath2 & "\" & .Name
    .SaveAs strPath3 & "\" & .Name
    End With
    End Sub

    --

    Vasant

    "Joseph Spain" <[email protected]> wrote in
    message news:8ygbe.5462$Bb.292@okepread06...
    > Hi,
    >
    > I would like to request a macro that can do the following tasks:
    >
    > 1. check to see if three specific network paths are available
    > 2. save to all of the network paths that are available, without
    > generating errors (or messages) for the paths that are not available
    >
    > Any ideas? Hopefully, someone already has written such a macro.
    >
    > As always, thanks very much for your assistance and suggestions
    >
    > Best regards,
    > Joseph
    >
    >
    >




  3. #3
    Joseph Spain
    Guest

    Re: request macro to save file to multiple, separate locations

    "Vasant Nanavati" <vasantn *AT* aol *DOT* com> wrote:

    > Untested since I'm not networked right now:
    >
    > Sub SaveToAllPaths(strPath1 As String, strPath2 As String, strPath3 As
    > String)
    > On Error Resume Next
    > With ThisWorkbook
    > .SaveAs strPath1 & "\" & .Name
    > .SaveAs strPath2 & "\" & .Name
    > .SaveAs strPath3 & "\" & .Name
    > End With
    > End Sub
    >
    > --
    >
    > Vasant


    Thanks much. I modified your idea slightly, and it works flawlessly.
    Good work.

    Best regards,
    Joseph



  4. #4
    Forum Contributor
    Join Date
    12-04-2003
    Posts
    360
    Is there anyway to do this process concurrently to reduce the overhead of saving multiple copies of large files?

  5. #5
    Dave Peterson
    Guest

    Re: request macro to save file to multiple, separate locations

    You may want to look at SaveCopyAs in VBA's help for another alternative.



    Joseph Spain wrote:
    >
    > "Vasant Nanavati" <vasantn *AT* aol *DOT* com> wrote:
    >
    > > Untested since I'm not networked right now:
    > >
    > > Sub SaveToAllPaths(strPath1 As String, strPath2 As String, strPath3 As
    > > String)
    > > On Error Resume Next
    > > With ThisWorkbook
    > > .SaveAs strPath1 & "\" & .Name
    > > .SaveAs strPath2 & "\" & .Name
    > > .SaveAs strPath3 & "\" & .Name
    > > End With
    > > End Sub
    > >
    > > --
    > >
    > > Vasant

    >
    > Thanks much. I modified your idea slightly, and it works flawlessly.
    > Good work.
    >
    > Best regards,
    > Joseph


    --

    Dave Peterson

  6. #6
    Forum Contributor
    Join Date
    12-04-2003
    Posts
    360
    Unfortunately this save a copy as a temp file in a specified location.
    It will still take twice as long.

    Imagine doing it saving a large network file to a diff location on another server!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1