Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
DP DP is offline
external usenet poster
 
Posts: 162
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use USB flash drive Longhorn Microsoft Word Help 6 June 22nd 09 05:08 PM
Recover document from flash drive momma Microsoft Word Help 2 June 13th 07 05:34 AM
How do I unlock documents in my flash drive? bridog73 Microsoft Word Help 1 February 1st 07 05:25 AM
VBA, FileCopy instead of save to Flash Drive? jimc New Users 4 December 27th 06 03:01 PM
Cannot delete file from flash drive Lamb chop Microsoft Word Help 2 September 29th 05 08:05 PM


All times are GMT +1. The time now is 06:50 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"