We are trying to copy text from the word file to powerpoint file using applescript.
For example,
If the style format of a text in word is “Title”, then it is placed in powerpoint in title style.
If the style format of a text in word is paragraph, then it is placed in the powerpoint in paragraph style.
If the style format of a text in word is First Level Bullet list, then this text is placed in powerpoint in First Level Bullet style.
If the style format of a text in word is Second Level Bullet list, then this text is placed in powerpoint in Second Level Bullet style.
We are able to successfully copy all text from word to powerpoint. And also both Title style and First Level Bullet style are correctly applied.
But the problem is with “Paragraph style” and “Second Level Bullet style”. When this text is copied into the powerpoint, both the text will use the “First Level Bullet list” format. The correct style is not applied.
Is there any way to do this in powerpoint using applescript.
We are able to select the table in Word 2004, but we are not able to paste the copied table from Word to PowerPoint.
We are using the below code:
tell application "Microsoft Word"
set this_application to active document
set myTable to table 1 of the active document
select myTable
tell application "System Events" to keystroke "c" using {command down}
end tell
Using this code we are able to select the first table in the active document but we are not able to paste the same table even in Word or in PowerPoint into Table slide.
The problem we have is that the keystroke is not working fine, as because we happen to copy any text before running this script.
Word 2004 is supporitng the VBA, so why you are not using VBA. Applescript is based on the dictionary only. It is mandatory to use AS. I have done the samething in VBA 1.5 year back.
I will suggest you to go for VBA if you are using Office 2004, but if you want to use Office 2008 then you can’t do anything with VBA. I don’t have Mac with me, otherwise it is not a difficult one.
Please let me know what error you are getting, just see the event log and paste the entire event log here.