Q: Variables in a file path
I have a working script that creates a folder each week and labels it with the day and the month eg. "...files/17Jan/"
I now would like the same script to follow on and open a word template and save it to that folder - the problem is the folder name changes each time.
How do I specify a file path which includes a variable previously calculated eg...
set d to current date
repeat
set w to (weekday of d) as number
if w = 1 then exit repeat
set d to d + (1 * days)
end repeat
d
set dayname to {day} of d as string
set monthname to {month} of d
dayname & monthname as string
in the following ...
set mydoc to "/Users/iona/Dropbox/lbc services joint folder/Service Running Schedule - DO NOT DELETE!!!!!.dotx"
tell application "Microsoft Word"
activate
open mydoc
save as active document file name "/Users/iona/Dropbox/lbc services joint folder/daynamemonthname/Service running schedule"
close active document
end tell
Thanks in anticipation
Neil
iPad, iOS 5.1.1
Posted on Jul 11, 2016 9:27 AM