I’m trying to get a Cocoa application to connect to Microsoft Word, and from my search it seems that the only way, is to use Scripting Bridge and generate a word header file. However, using the approach explained in Apples example project SBSendEmail:
sdef "$INPUT_FILE_PATH" | sdp -fh -o "$DERIVED_FILES_DIR" --basename "$INPUT_FILE_BASE" --bundleid `defaults read "$INPUT_FILE_PATH/Contents/Info" CFBundleIdentifier`
Does not generate a usable word header file, I get the following:
sdp: enumerator of enumeration "e183": missing required "name" attribute.quote
From further search on Google, I found the following discussion on Apple forums: https://discussions.apple.com/thread/2623068?start=0&tstart=0
Where the OP had the same issue, however, trying what he got to work, does not help, i.e. still no usable header file. OP recommended using the following:
sdef ./Microsoft\ Word.app/ > word.sdef
cat word.sdef | sdp -fh --basename word
So I wonder, if anyone has an idea how to fix the issue or if there is some other way to send and get data/info from Microsoft Word.