From: cresimpl on 9 Feb 2010 11:48 HI My questions are: 1) How to use: tcom, optcl, msdoc, others ..., to paste to the MS Word an image with the specified location (eg c: \ obrazek.jpg)? 2) Is there anyone who is able to translate the code snippet from the MS Word macro, to tcl (tcom or other library of tcl)? 3) How can I use macros from MS Word from tcl with !Parameter! (tcom or other...)? Thank you, for your help, cresimpl
From: cresimpl on 15 Feb 2010 13:03 This is part of macro from MSWord macro tool, which paste image to MSWord: Selection.InlineShapes.AddPicture FileName:= _ "C:\Documents and Settings\user\Moje dokumenty\Moje obrazy \bbb.jpg", _ LinkToFile:=False, SaveWithDocument:=True How to translate it to tcl TCOM?
From: Goeran Hanke on 22 Feb 2010 13:12 cresimpl schrieb: > This is part of macro from MSWord macro tool, which paste image to > MSWord: > > Selection.InlineShapes.AddPicture FileName:= _ > "C:\Documents and Settings\user\Moje dokumenty\Moje obrazy > \bbb.jpg", _ > LinkToFile:=False, SaveWithDocument:=True > > How to translate it to tcl TCOM? Hi you may use the MS Word object catalogue inside the VBA editor to look at the parameters of the Word methods and their classes. The code snippet itself: -------------------------------------------------------------------- proc testword {img file} { set img [file nativename [file normalize $img]] set file [file nativename [file normalize $file]] package require tcom set word [tcom::ref createobject Word.Application] # $word Visible true $word Visible false set doc [[$word Documents] Add] [[$word Selection ] InlineShapes ] AddPicture $img false true $doc SaveAs $file $word Quit } testword test.jpeg mydoc.doc -------------------------------------------------------------------- G�ran -- string map {DOT . AT @} gDOThankeATgmxDOTde
|
Pages: 1 Prev: OS X - can't change button color Next: ActiveTcl 8.4.19.3 released |