Save all open files-DOCX, XLSX, PPTX, TXT

bbbb1234

Board Regular
Joined
Aug 8, 2002
Messages
150
Office Version
  1. 365
Platform
  1. Windows
Hi All -

Since Excel, PowerPoint, and Notepad/Text files do not have a Save All button like Word does, can anyone tell me what the VBA code is that I can drop into an Excel macro to save all of the file types listed in the Subject Line of the post? I did a bunch of searches on the web and found one that works for XLSX files but not the others. I am running Windows 11 if that matters.

Thanks in advance!!!!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Adding one other item that might be helpful.

I want the VBA macro in Excel to determine what files are open in Word, PowerPoint, and Notepad and then save each of the open files, like it does for Excel via this macro:
Sub SaveAll()
Dim xWb As Workbook
For Each xWb In Application.Workbooks
If Not xWb.ReadOnly And Windows(xWb.Name).Visible Then
xWb.Save
End If
Next
End Sub

Hope that helps and thanks in advance for assistance on this request/macro!!!
 
Upvote 0
Mr. Excel Community - don't let me down peeps!!! I have NEVER been let down or disappointed with Mr. Excel!!! Hoping to hear back from someone soon!!!!
 
Upvote 0
Hmm - disappointing that no one has a macro solution for this. Thanks for any assistance anyone can offer.
 
Upvote 0
To be frank with you, I have never heard of such a thing in Excel. I have heard of taking other file types and saving as Excel file types, but never saving Word docs as Word docs from Excel, saving PowerPoint files as PowerPoint files from Excel, etc. I am not saying that it cannot be done, I have just never heard of it or seen anyone do it in my 20+ years here. So I am not surprised that you have not gotten any replies on it.

It seems to me that maybe a better approach would be to try to do it from outside Excel, perhaps by something like PowerShell. Not sure exactly what that would look like, as I have done very little programming myself in PowerShell, but I think I have seen it used it cross-application requests before.
 
Upvote 0
To be frank with you, I have never heard of such a thing in Excel. I have heard of taking other file types and saving as Excel file types, but never saving Word docs as Word docs from Excel, saving PowerPoint files as PowerPoint files from Excel, etc. I am not saying that it cannot be done, I have just never heard of it or seen anyone do it in my 20+ years here. So I am not surprised that you have not gotten any replies on it.

It seems to me that maybe a better approach would be to try to do it from outside Excel, perhaps by something like PowerShell. Not sure exactly what that would look like, as I have done very little programming myself in PowerShell, but I think I have seen it used it cross-application requests before.
Hi Joe4 -
Thanks for your reply! I fully understand what you are saying. I too am not well versed in PowerShell and really would not know where to start. As I mentioned in my original post, I have searched the web for a utility similar to what I am looking for but no bueno. I have also searched CNET's download.com - nothing. Do you have any other suggestions on where to post something like this or a Microsoft utility or anything that might help? I really get tired of going to each app, including Notepad, and saving each file individually. Whatever you can do to help would be greatly appreciated!!
Thanks a million!!!
 
Upvote 0
Is there some relationship between all these files? Or are you just trying to close down all your open applications at once?
Excel and VBA is really set-up to mostly "self-contained", i.e. controlling the stuff open within it. Trying to control other applications from Excel can be a bit complex/tricky, something that I usually try to avoid.

I found this thread here on closing all open apps on your computer using PowerShell: How to close all windows

I also found this PowerShell Help Forum. I would probably recommend posting your question there: PowerShell Forums

That is about all the help I can offer!
 
Upvote 0
Is there some relationship between all these files? Or are you just trying to close down all your open applications at once?
Excel and VBA is really set-up to mostly "self-contained", i.e. controlling the stuff open within it. Trying to control other applications from Excel can be a bit complex/tricky, something that I usually try to avoid.

I found this thread here on closing all open apps on your computer using PowerShell: How to close all windows

I also found this PowerShell Help Forum. I would probably recommend posting your question there: PowerShell Forums

That is about all the help I can offer!
Thanks for the info and leads!!! That really helps!!
 
Upvote 0
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,076
Members
449,094
Latest member
mystic19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top