OS Xの「サービス」を使用して、WordをTextに変換。
【作成方法】
アプリケーション > Automator > サービスを選択。
ライブラリ > AppleScriptを実行をダブルクリック。
画像のように、AppleScriptコードを入力して、
「WordをTextに変換」などの適当な名前で保存。
▼AppleScriptコード
参考にしたサイトは現在、存在しませんが、
そのサイトのコードをほぼそのまま使用させていただいてます。
ありがとうございます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
on run {input, parameters} --activate --display dialog "Wordの校閲が使用されていないか注意してください。" giving up after 2 repeat with f in input set theSuffix to name extension of (info for f) if theSuffix contains "doc" then my convertDocToText(f) end if end repeat BeepVolume2() of me return input end run to convertDocToText(f) set FilePath to (quoted form of POSIX path of f) as Unicode text (* ターミナルのコマンドtextutilは文字コード変換もAppleScriptに文字化けしないから便利。 元のファイルがSJISでもUTF8でも問題ない *) try do shell script "textutil -convert txt " & FilePath end try end convertDocToText on BeepVolume2() set getvolume to get volume settings set outVol to output volume of getvolume set myVol to outVol / (100 / 7) set volume 1 --実際に鳴らす音量 数値:0-7まで beep 1 delay 0.5 beep 1 set volume myVol end BeepVolume2 |
【使い方】
Wordファイルを選択して右クリックして、
作成したサービスを選ぶと、
同階層にテキストが生成されます。