I have a problem indicating my AppleScript an error while running.
Error: "Microsoft Word" hast found an error: "active document" can´t read." number -1728 from active document
Word Version: Word 2016 Home & Business for Mac
Code:
tell application "Microsoft Word"
active
open "OSX_El_Capitan:Documents:Header:MyHeader.dotx"
set theDoc to active document
tell theDoc
insert file at text object of bookmark "test" file name "OSX_El_Capitan:Documents:Template:DocTemp"
save in "OSX_El_Capitan:Documents:My Save Name.docx"
end tell
end tell
The scripts has stopped in line "save in..." and marked this line. The other parts over "save in" are working. Whether it maybe is a problem active document I do not know.
save as file name "OSX_El_Capitan:Documents:My Save Name.docx"– vadian Sep 9 at 13:43