VBA to applescript

L

LiMa

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I just upgraded from word 2004 to word 2008 and didn't keep in mind, that 2008 doesn't use VBA and isn't applescript-recordable.

So I have one little, but very often used macro, and I don't know how to "translate" it to apple script (I tried, but it didn't work...)

The macro cuts a selected text, moves to the next cell in this table, and pastes the text there.

Selection.Cut
Selection.MoveRight Unit:=wdCell
Selection.PasteAndFormat (wdPasteDefault)

any help is appreciated
 
L

LiMa

I wasn't able to get word move to the next cell, so I tried the "hard way". Not beautiful, but it works :)

tell application "Microsoft Word"
activate
cut object selection
end tell
tell application "System Events"
keystroke tab --jump to the next cell
end tell
tell application "Microsoft Word"
activate
paste object selection
end tell
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top