This forum has been a tremendous help to me and I really appreciate the input from many of you.
To my question, I have a script that appends doc files vertically. I have implemented a table view whereby the doc files can be reordered and set as aliases. So, for example, these files are ordered from top–> bottom : 1.doc, 2.doc, 3.doc. A page break is inserted between each file.
However, using the code below, the files are appended in reverse (3.doc is first, not last).
on Merge() set theItems to aliasesOfMainDataSource() set x to 0 set theOutputPath to (path to desktop folder as string) & "MasterDoc.doc" tell application "Microsoft Word" activate make new document repeat with aFile in theItems tell application "Finder" set fileRef to ((a reference to file aFile) as string) end tell insert file at text object of selection file name fileRef if x < ((count of theItems) - 1) then insert break at text object of selection break type page break end if set x to x + 1 end repeat save as active document file name theOutputPath end tell end Merge
This script was extracted from: http://www.macosxhints.ch/files/wordkombinieren.txt
I’d appreciate some guidance and thanks once again to all on this forum.