

Outlook VBA macro for saving emails copies in a local folder.Macro for both excel and openoffice calc.Error 1004 in my Macro while saving a Excel workbook as a CSV for Japanese.

sSource = String(ARGUMENTS)įinally, this post gives details on how to add a toolbar button to run your macro with one click. This file is named ~/Library/Application\ Support//3/user/Scripts/javascript/Tools/Regex.js and is hardcoded and referenced above. Here is a bit of javascript that the above macro relies upon. RegExpReplace = oScriptReplace.invoke(Array(sSource, sRegExp, sGlobUpcase, sReplace ), Array(), Array()) SReturn = RegExpReplace(oScriptReplace, FileURL, "(.*)/(\w*-\w*)(-revision\d*)+\.xls", "i", "$2.csv")ĭim args1(2) as new .PropertyValueĪrgs1(0).Value = "file:///Users/joe/Documents/mydocuments/trunk/my%20projects/dictionary/verbsXLS/proofed/csv/" + sReturnĪrgs1(1).Value = "Text - txt - csv (StarCalc)"ĭispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args1())įunction RegExpReplace(oScriptReplace as Object, sSource as String, sRegExp as String, sGlobUpcase as String, sReplace as String) as String OScriptReplace = oMasterScriptProvider.getScript(":?language=JavaScript&location=user") OMasterScriptProvider = oMasterScriptProviderFactory.createScriptProvider("")

OMasterScriptProviderFactory = createUnoService(".provider.MasterScriptProviderFactory") REM ***** BASIC *****ĭocument = ĭispatcher = createUnoService(".DispatchHelper") The information that helped me do this is here. I'm on a Mac, so the file paths will be for such an operating system. This is the solution I came up with to help in exporting a CSV (with my export options, filename adjustment, and file location) with one click.
