Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
synchronizing to HD and flash drive
I am running Word 2002 and am constantly bringing my files to work via a
flash drive. With all the back-and-forth I often am unsure if my flash drive or HD file is the current. I reviewed Graham Mayor's (MVP) reply on this issue but it was confusing to me. What I am looking for is a macro (or other) that will save the document I am working to both my HD and flash drive (if inserted) when requested. Thanks |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
synchronizing to HD and flash drive
I don't know which reply of mine you are referring to as you have not quoted
it or replied to the thread, however there's a method on my web site for copying to flash http://www.gmayor.com/automatically_backup.htm This adds a date to the filename and saves backups to alternative folders If Even = (Day(Now) Mod 2) - 1 Then strFileB = "D:\My Documents\Test\Versions\Odd\" & Format$(Date, "MMM d ") _ & strFileA Else strFileB = "D:\My Documents\Test\Versions\Even\" & Format$(Date, "MMM d ") _ & strFileA End If If you don't want that complexity, remove the above lines which should give you something like the following. I have added an input box to enable you to enter the drive letter of the flash drive as this is likely to change with the hardware you plug the drive into (you can change the default there from H to whatever you prefer) . You will need the macro on both the PCs you work on. I would urge you to always copy from the flash drive to the hard drive before working on the document. Sub SaveACopyToFlash() Dim strFileA As String Dim strFileB As String Dim strFlash As String strFlash = InputBox("Enter Flash Drive Letter", "Flash Drive", "H") ActiveDocument.Save 'save the original document strFileA = ActiveDocument.name 'Saved original document name strFlash = strFlash & ":\" & strFileA 'Flash drive filename ActiveDocument.Close 'Close the document On Error GoTo oops 'Error handler for missing flash drive FileCopy strFileA, strFlash 'Copy source to flash Documents.Open strFileA End oops: If Err.Number = 61 Then MsgBox "Disc Full! The partial file created will be deleted", vbExclamation Kill strFlash 'Remove the partial file Else MsgBox "The flash drive is not available", vbExclamation End If Documents.Open strFileA End Sub http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org DP wrote: I am running Word 2002 and am constantly bringing my files to work via a flash drive. With all the back-and-forth I often am unsure if my flash drive or HD file is the current. I reviewed Graham Mayor's (MVP) reply on this issue but it was confusing to me. What I am looking for is a macro (or other) that will save the document I am working to both my HD and flash drive (if inserted) when requested. Thanks |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to use USB flash drive | Microsoft Word Help | |||
Recover document from flash drive | Microsoft Word Help | |||
How do I unlock documents in my flash drive? | Microsoft Word Help | |||
VBA, FileCopy instead of save to Flash Drive? | New Users | |||
Cannot delete file from flash drive | Microsoft Word Help |