|
|
#1 |
|
Applescript to insert sound in Microsoft Word
I've spent hours on figuring out how to do this. There is an "API" for inserting images (like make inline picture), but I did not find anything about how to insert a sound into the Word document (2011 Office). Any help will be appreciated. Thanks
|
|
|
|
0
|
|
|
#2 |
|
Looked in the dictionary and could not find anything usable. You can always use UI scripting.
Example from Dutch version of Word 2011 : Code:
GUIScripting_status()
activate application "Microsoft Word"
tell application "System Events"
tell process "Microsoft Word"
-- insert GUI Scripting statements here
click menu item "Geluid uit bestand..." of menu 1 of menu item "Audio" of menu 1 of menu bar item "Invoegen" of menu bar 1
end tell
end tell
on GUIScripting_status()
-- check to see if assistive devices is enabled
tell application "System Events"
set UI_enabled to UI elements enabled
end tell
if UI_enabled is false then
tell application "System Preferences"
activate
set current pane to pane id "com.apple.preference.universalaccess"
display dialog "This script utilizes the built-in Graphic User Interface Scripting architecture of Mac OS x which is currently disabled." & return & return & "You can activate GUI Scripting by selecting the checkbox \"Enable access for assistive devices\" in the Universal Access preference pane." with icon 1 buttons {"Cancel"} default button 1
end tell
end if
end GUIScripting_status
Audio = Audio Geluid uit bestand... = Sound from file...(not sure about this)
__________________
Space Corps Directive 34124 |
|
|
|
0
|
|
|
#3 |
|
Yes, this is exactly what I'm doing now. But when the sound inserted using UI scripting - it appears in the top left corner, but I need to make it inline with text.
Thanks |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 04:41 AM.






Linear Mode
