saving files

dasadler
5StarLounger
Posts: 889
Joined: 25 Jan 2010, 16:26
Location: Garden Grove, CA 92844 USA

saving files

Post by dasadler »

Is it possible to save a file in two locations at the same time?
Don

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: saving files

Post by HansV »

Not sure what you mean, and what the context is. You can use Save As twice of course. Or you can save a file in one folder, and place a shortcut to the file in another folder.
If you provide more details, you may get a more helpful reply.
Best wishes,
Hans

User avatar
stuck
Panoramic Lounger
Posts: 8176
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: saving files

Post by stuck »

Since you'd have to specify where you want the two copies of the file to end up the simple thing to do, as already suggested by Hans, is to use Save As twice. You could automate that with a macro and assign it to a button on the QAT to make it a one click option.

Ken

dasadler
5StarLounger
Posts: 889
Joined: 25 Jan 2010, 16:26
Location: Garden Grove, CA 92844 USA

Re: saving files

Post by dasadler »

Thanks. My context is that I just installed the Microsoft Skydrive and wanted to save certain files there but I don't want them stored there exclusively. So, I was thinking that if I could save a file in the folder I normally use AND in the Skydrive, I would be covered.

If I wanted to save an Excel file as either an XLSM or XLSX in two places.. what sort of code would I need for that to happen? I intend to do this mostly with Excel and Access (saving an Access file, that is).
Don

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: saving files

Post by HansV »

You can synchronize a folder on your hard disk with SkyDrive - wouldn't that be easier?
Best wishes,
Hans

dasadler
5StarLounger
Posts: 889
Joined: 25 Jan 2010, 16:26
Location: Garden Grove, CA 92844 USA

Re: saving files

Post by dasadler »

I didn't know you could do that. When I installed skydrive on my computer, it created a folder and I presume it retains access to that folder for synching purposes. My concern is having to trust an external site, like skydrive, to not mess with, delete, or corrupt my only copy of the file. Hence, saving in two places.
Don

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: saving files

Post by HansV »

You could use VBA in Excel to save a copy of the workbook to the SkyDrive folder, e.g. in the ThisWorkbook module:

Code: Select all

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    ThisWorkbook.SaveCopyAs Filename:="C:\SkyDrive\" & ThisWorkbook.Name
End Sub
Substitute the path to your SkyDrive folder.

But you can't copy an Access database while it's open, so you'll have to copy it to the SkyDrive folder while the database is *not* open...
Best wishes,
Hans

JoeP
SilverLounger
Posts: 2069
Joined: 25 Jan 2010, 02:12

Re: saving files

Post by JoeP »

Read about the latest SkyDrive update - SkyDrive: Now with Selective Sync and Shared Content.

Joe
Joe

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: saving files

Post by HansV »

Selective Sync sounds just like what Don needs - thanks!
Best wishes,
Hans