gui print

I am trying to convert an ms word file to a jpeg (long story). It seems that gui is the only way to do this.

What I need to do is get a print preview of a file… sounds easy enough but I cant seem to do it. Using the inspector I have recieved this info about the print dialog:

<AXApplication: “Word”>
<AXWindow: “Print”>

<AXButton: “Preview”>

Attributes:
AXRole: “AXButton”
AXRoleDescription: “AXButton”
AXChildren: “”
AXParent: “”
AXTitle: “Preview”
AXWindow: “<AXWindow: “Print”>”
AXPosition: “x=445 y=732”
AXSize: “w=70 h=20”
AXEnabled: “1”

Actions:
AXPress - press

So, my questions are: 1- how do I turn this info into something that applescript will understand? and 2- is there some sort of tutorial or reference that explains things like question 1?

side note- here is what I have tried for a script:
tell application “System Events”
tell process “Microsoft Word”
set frontmost to true
tell window “Print”
click button “Preview” of window “Print”
end tell
end tell
end tell

thanks for any help
j

note- i tried using the solution provided in a similar topic question regarding appleworks, but this just didnt work… sigh

got it

tell application “System Events”
activate
tell process “Microsoft Word”
set frontmost to true
keystroke “p” with command down
tell UI element 5 of window “Print”
click button “Preview”
end tell
end tell
end tell