Hello,
I have a task to open Microsoft Word and create a new document in Objective C.
If I am running an Apple Script below in the Script Editor, it works fine and a new Microsoft Word document gets created:
tell application "Microsoft Word" to make new document"
BUT, if I am trying to call the same script from Objective-C code (see it below), it only opens the Microsoft Word application, but does not create a new document :
NSDictionary* errorDict;
NSAppleScript * appleScript = [[NSAppleScript alloc] initWithSource:
@"tell application \"Microsoft Word\" to make new document"];
[appleScript executeAndReturnError:&errorDict];
I guess there is something to do with the permissions.
Any ideas are very welcome!
I have a task to open Microsoft Word and create a new document in Objective C.
If I am running an Apple Script below in the Script Editor, it works fine and a new Microsoft Word document gets created:
tell application "Microsoft Word" to make new document"
BUT, if I am trying to call the same script from Objective-C code (see it below), it only opens the Microsoft Word application, but does not create a new document :
NSDictionary* errorDict;
NSAppleScript * appleScript = [[NSAppleScript alloc] initWithSource:
@"tell application \"Microsoft Word\" to make new document"];
[appleScript executeAndReturnError:&errorDict];
I guess there is something to do with the permissions.
Any ideas are very welcome!