I’ve tried to script this process, but I believe I’m running into a dead end. The process is a calculated applescript from within FileMaker that would export multiple records to an applescript created table in Word. I’m having trouble processing fields into cells.
More or less here is the code (this is a calculated AS in FMP)
"tell application \"Microsoft Word\"¶
set row1 to \"2\"¶
make new table at active document with properties {number of columns:2, number of rows:row1}¶
tell font object of selection¶
set name to \"Times New Roman\"¶
set bold to true¶
set font size to 10¶
end tell¶
set enable borders of border options of table 1 of active document to false¶
tell paragraph format of selection to set alignment to align paragraph left¶
type text selection text \"" & PieceSelect::Title & "\"¶
tell font object of selection¶
set name to \"Times New Roman\"¶
set bold to false¶
set font size to 10¶
end tell¶
tell paragraph format of selection to set alignment to align paragraph right¶
type text selection text \"" & PieceSelect::Composer & "\"¶
Or straight from AS editor…(without the FMP stuff)
tell application "Microsoft Word"
set row1 to "2"
make new table at active document with properties {number of columns:2, number of rows:row1}
tell font object of selection
set name to "Times New Roman"
set bold to true
set font size to 10
end tell
set enable borders of border options of table 1 of active document to false
tell paragraph format of selection to set alignment to align paragraph left
type text selection text "PieceSelect::Title "
tell font object of selection
set name to "Times New Roman"
set bold to false
set font size to 10
end tell
tell paragraph format of selection to set alignment to align paragraph right
type text selection text " & PieceSelect::Composer "
I was planning to do the repeating using the Loop function in FMP, but would it be better to use a AS function calling portal records? Any help or direction or saying “you’re way off try this way” would be appreciated.
jon