![]() You need to use and .macroenabled respectively for these. This document is provided for information purposes only and is neither a recommendation nor a guarantee of results. 'If there are multiple files, split it into an array and return the resultsįinally, it can be a bit of a pain specifying different file types, if you want to specify only Word documents, then replace public.TEXT with, however this won't allow. The application-specific steps and screenshots in this document were created using Microsoft Word 2011:Mac and Microsoft Word for Mac 2016 (version 16.16.16) while creating a DOCX document. "set applescript's text item delimiters to """" " & vbNewLine & _ MyPath & """ multiple selections allowed true) as string" & vbNewLine & _ "with prompt ""Please select a file or files"" default location alias """ & _ "set theFiles to (choose file of type " & " " & _ MyScript = "set applescript's text item delimiters to "","" " & vbNewLine & _ 'Set up the Apple Script to look for text files MyPath = MacScript("return (path to documents folder) as String") 'Uses AppleScript to select files on a Macĭim MyPath As String, MyScript As String, MyFiles As String, MySplit As Variant ![]() The code that calls the function and displays a message box with all the files: Sub GetTextFilesOnMac()įor ii = LBound(vFileName) To UBound(vFileName)Īnd the function that does the Apple Script work: Function Select_File_Or_Files_Mac() As Variant You would simply be able to modify the Apple Script to return other file types and select directories, I'll leave that to you. The following code allows the user to select text files which is returned as an array from the function. ![]() ![]() I believe you have to use Apple Script in order to do this a bit better on the Mac. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |