Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2005

Tip: Looking for answers? Try searching our database.

saving a backup

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bobby - 15 Apr 2005 06:42 GMT
I've been trying to save a ducument from a macro as follows
Private Sub CommandButton1_Click()
With Dialogs(wdDialogFileSaveAs)
  .Name = Format(Date, "dd mmm yyyy") & ("  t-l information and
handover050411.doc")
  .Show
End With

End Sub
problem is that we access the original file from a short cut and when the
file is backed up it obviously puts the date at the front and changes the
name. problem is the shortcut we use then takes us back to the unsaved
document of the original name. Can anyone help please?
Jean-Guy Marcil - 15 Apr 2005 13:40 GMT
Bobby was telling us:
Bobby nous racontait que :

> I've been trying to save a ducument from a macro as follows
> Private Sub CommandButton1_Click()
[quoted text clipped - 9 lines]
> changes the name. problem is the shortcut we use then takes us back
> to the unsaved document of the original name. Can anyone help please?

This is normal behaviour. The shortcut points to a file, when you run your
macro, you create a new file.
You would have to edit the shortcut and I am not sure if you can do that
from within Word (Shortcut properties are possibly accessible via
scripting.)

Or you could have code that creates a document variable in the original
document when you create the backup. Then, when the original document is
opened, users could be given a message box to remind them that a newer
version exists.
You could even ask them if they would like to automatically open it if they
click Yes, providing that it was not moved since having been created...

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Bobby - 16 Apr 2005 11:50 GMT
ok thanks for that, but i now have doing what i want to do but my only
problemis is now that it keeps trying to save to "my documents" instead of
the network drive where it was opened, do you know how i can keep the
original path?

> Bobby was telling us:
> Bobby nous racontait que :
[quoted text clipped - 25 lines]
> You could even ask them if they would like to automatically open it if they
> click Yes, providing that it was not moved since having been created...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.