• Automating backups to a network folder

    Author
    Topic
    #1767471

    I am sure there must be a way. With WordBASIC, I probably could have squeegeed something out fairly quickly, but I am much less familiar with VBA–and I’m working on a project with a short deadline. I’m hoping form some guidance from the VBA/Word gurus out there.

    Here’s what I want to do: create a macro that will
    – Save the file I am working on to a specific network folder at set intervals (probably 10am, noon, 2pm, 4pm, and 6pm) whenever the document is open.
    – Save the file I am working on to the same folder whenever I press an assigned key combination.
    – When saving to the network folder, append the date (month & day only) and time (hours & minutes only) to the filename (but before the .doc).
    – Leave me working “in” the base file, with the base filename, on my local drive (so that when I simply click Save, like I do frequently, it saves on my local drive).

    I should note that the first item would be a “nice to have,” meaning that I’d be just as happy if all the other functionality was present. Such a macro would probably also have to be robust enough to check for the existence of the folder (make sure the network wasn’t down at that very moment) and compensate appropriately.

    If anyone knows how to do this in a quick-n-dirty way, or knows of existing code that would do this (that would have to be modified only to the extent that I add the path to the network folder), I’d much appreciate it.

    thx in advance.

    P.S. Woody, if you’re around, when are we gonna get a Hacker’s Guide for Word? I miss it so, and I’m sure a new one would become as dog-eared as the 2 previous versions I still have.

    Viewing 0 reply threads
    Author
    Replies
    • #1775118

      – Save the file I am working on to a specific network folder at set intervals (probably 10am, noon, 2pm, 4pm, and 6pm) whenever the document is open.

      —> Go to Tools-Options-File locations and change your Autosave file location to that network folder you want. Change the interval at which it saves it from 10 minutes to the 2-hour increment you seem to want.

      – Save the file I am working on to the same folder whenever I press an assigned key combination.
      – When saving to the network folder, append the date (month & day only) and time (hours & minutes only) to the filename (but before the .doc).
      – Leave me working “in” the base file, with the base filename, on my local drive (so that when I simply click Save, like I do frequently, it saves on my local drive).

      —> If you know WordBasic, you could practically record this one. I’m NOT a coder, but I can usually tell them what I want. Here’s what you can post in the VB/VBA forum here at WOPR:

      “I want a Word macro that will hit Window-New Window, then File-Save as, change the path to save the file to (call it C:MyDirectory for now, I’ll change it later), save the file with the same name and with modified date after the name and before the extension, and then close the extra window after it’s saved.”

      I’m pretty sure they can do all that except the month/day/time part of the filename–not sure about that part. You could record the rest of it except they’ll have to do that dim filename code part and I don’t know anything about dim except for lights and sum chinese…

      Hope this helps even a little.

    Viewing 0 reply threads
    Reply To: Automating backups to a network folder

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: