![]() ![]() ReDim Preserve selFiles(.SelectedItems.Count - 1) Filters.Add "All Word Files", "*.docx *.docm *.doc", 1 With Application.FileDialog(msoFileDialogFilePicker) StrFolderPath = Left(iSplit(0), InStrRev(iSplit(0), Sep)) IPath = MacScript("return (path to documents folder) as String") ![]() Michaels, Office Apps and Services MVPĭim strFolderPath As String, Sep As Stringĭim iPath As String, iScript As String, iFiles As Stringĭim iSplit As Variant, N As Long, FileFormat As StringįileFormat = "" MacScript in VBA (Visual Basic for Applications) jargon. I have not included a Macro Procedure Sub Name or End Sub statement, I expect that you will be pasting this code into your own uniquely named subroutine.Īn acknowledgement is made to the Ron de Bruin Excel Automationwebsite for tips and script The following is the VBA code that performs the cross-platform file handling. You select the files from the File Explorer/Finder dialog that ![]() ![]() The routine can be used to open just one document, or almost an unlimited number of documents … the limitation is just how many files you want to include in the batch. The macro provided is fully self-contained, it automatically determines the platform (PC or Mac) where it is running and then uses the proper methods for finding and opening the documents. It is also just the critical first part of the overall macro solution that you will need to apply your uniquely batched edits. Versions of Windows Office from 2016 back to 2007. The solution provided here runs with Mac Office 20 and all However, most were created for earlier versions of Word and none run cross-platform (PC and Mac) without major alteration. Search the web you might find a few solutions that you can try. To do this, a macro is required, and if you Summary: There are occasions when the identical Find and Replace edit is required to be made in multiple documents, or Style changes, or Tracked Change edits, et cetera. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2023
Categories |