rebol [ Title: "Word Print" File: %word-print.r Date: 30-Jun-2006 Version: 1.0.0 Progress: 0.45 Status: "working, not tested all the way to printing" Needs: [] Author: "Anton Rolls" Language: "English" Purpose: {Print from Word} Usage: {} History: [ 1.0.0 [30-Jun-2006 {First version, converted from Ben's} "Anton"] ] ToDo: { - } Notes: {} ] if error? set/any 'error try [ do/args %../COMLib.r [ ; Use the COMLib API functions here word_obj: createObject "Word.Application" PutValue [word_obj ".Visible = %s" "TRUE"] word_doc: GetObject [word_obj ".Documents.Add"] color: to-string to-integer to-binary reverse 0.128.255 PutValue [word_obj ".Selection.Font.Size = %s" "20"] PutValue [word_obj ".Selection.Font.SmallCaps =%s" "1"] PutValue [word_obj ".Selection.Font.Name = %s" "Comic Sans MS"] PutValue [word_obj ".Selection.Font.Color = %s" color] CallMethod [word_obj ".Selection.TypeText(%s)" "hello from rebol (printing! look for the print manager...)"] CallMethod [word_obj ".Selection.TypeParagraph()"] CallMethod [word_doc ".PrintOut()"] release word_doc release word_obj ] ][ print mold disarm error ]