Re: Opening a msword document with tcom



Fernando Quinones wrote:
Hello group,
I am using ActiveState ActiveTcl 8.4.7.0. I cannot get to open a MS Word document with tcom. This document is in the same folder where I open the tcl. What I am trying to do is get some data from another MS Word document (I have that part already, not using tcom), passing that data to some variables then searching for a determined text and replacing all the instances of that text with the determined value from the other document.

Also, I cannot find much information on tcom. Commands and examples. I been to the wiki, it has been helpful, but I am sure they are a place with more information and I cant find it. A book would help too. That will be of great help. I might even stop asking here! LOL!


package require tcom
set application [::tcom::ref createobject "Word.Application"]
set documents [$application Documents]
set document [$documents Open target.doc]
set docApp [$document Application]

Any help with the script or the documentation will be great.

Fernando

BTW, This is in Windows XP.
.



Relevant Pages

  • Opening a msword document with tcom
    ... I am using ActiveState ActiveTcl 8.4.7.0. ... What I am trying to do is get some data from another MS Word document (I have that part already, not using tcom), passing that data to some variables then searching for a determined text and replacing all the instances of that text with the determined value from the other document. ... set documents ...
    (comp.lang.tcl)
  • OLE automation using TCL
    ... I'm trying to automate generation of a MS Word document. ... language for this purpose is TCL, though I'm willing to move out to VB ... I found out about the tcom package ...
    (comp.lang.tcl)
  • Re: Opening a msword document with tcom
    ... I am using ActiveState ActiveTcl 8.4.7.0. ... document with tcom. ... to some variables then searching for a determined text and replacing all ... The name escapes me now but there was a utility that would list all ...
    (comp.lang.tcl)
  • Re: Opening a msword document with tcom
    ... I am using ActiveState ActiveTcl 8.4.7.0. ... document with tcom. ... This document is in the same folder where I open the ... The name escapes me now but there was a utility that would list all ...
    (comp.lang.tcl)