Possible to open and create an excel or word document in a folder instead of going the long route of clicking on the Document icon, 'new sheet' and 'save as'?
Appreciate any help.
Appreciate any help.
Thanks Bernuli, I think that's what exactly I am doing now.
I am looking to just create an 'excel' or 'word' document right from the Folder where I want to save it at.
I guess there's no other 'efficient' way around this huh?
That's what I use, I prefer the keyboard shortcuts where ever possible, and in some cases I use macros to automate certain tasks and assign those to a keyboard shortcut as well.Power users utilize keyboard shortcuts.
In this case cmd+n followed by shift+cmd+s
Ok, so here is an applescript you can put into Automator. When you start up Automater, select service for your type of document.
Drag the action "Run AppleScript" to the workflow panel.
Then paste in the following
tell application "Finder"
try
set currentDir to (target of front Finder window) as string
on error
set currentDir to path to desktop folder as string
end try
end tell
display dialog "Specify file name: " & currentDir default answer ""
set fileNameYo to the text returned of the result
tell application "Microsoft Excel"
activate
set myWorkbook to make new workbook
save workbook as myWorkbook filename currentDir & fileNameYo & ".xlsx"
end tell
Once you do that you can assign the service a keyboard shortcut that is accessible in the finder window you are in.
View attachment 604048 View attachment 604049
tell application "Finder"
try
set currentDir to (target of front Finder window) as string
on error
set currentDir to path to desktop folder as string
end try
end tell
display dialog "Specify file name: " & currentDir default answer ""
set fileNameYo to the text returned of the result
tell application "Microsoft Excel"
activate
set myWorkbook to make new workbook
save workbook as myWorkbook filename currentDir & fileNameYo & ".xlsx"
close active workbook
quit
end tell
DIR="$1"
FILE="$DIR/untitled.txt"
COUNTER=1
while [[ -e $FILE ]]; do
FILE="$DIR/untitled-$COUNTER.txt"
((COUNTER++))
done
touch "$FILE"