home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
worddocedi.tcl
< prev
next >
Wrap
Text File
|
1997-07-18
|
2KB
|
89 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)worddocedi.tcl /main/titanic/2
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)worddocedi.tcl /main/titanic/2 18 Jul 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require_module_file "doceditor.tcl" docwriter
Class WordDocEditor : {DocEditor} {
constructor
method destructor
method connect
method disconnect
method edit
method show
method print
method preview
attribute wordObj
}
constructor WordDocEditor {class this name_1} {
set this [DocEditor::constructor $class $this $name_1]
# Start constructor user section
$this printsIncluded y
$this name Word
$this version 70
$this localSectionTypes "[$this localSectionTypes] Doc"
# End constructor user section
return $this
}
method WordDocEditor::destructor {this} {
# Start destructor user section
# End destructor user section
$this DocEditor::destructor
}
method WordDocEditor::connect {this} {
uplevel #0 require wordautoma.tcl
$this wordObj [WordAutomationObject new]
}
method WordDocEditor::disconnect {this} {
[$this wordObj] delete
}
method WordDocEditor::edit {this docSection} {
# look up winword in the registry
if [catch {
set wwCurVer [registry get HKEY_CLASSES_ROOT \
"Word.Document\\CurVer" "(Default)"]
set wwExe [registry get HKEY_CLASSES_ROOT \
"$wwCurVer\\shell\\open\\command" "(Default)"]
}] {
wmtkerror "[$docSection uiName]: edit failed, Word not found"
return
}
wmtkmessage "Starting edit for section '[$docSection uiName]'"
set cmd [list \
"$wwExe [$docSection docLocation] &" \
[$docSection uiName] \
]
$docSection execute "$cmd"
}
method WordDocEditor::show {this docSection} {
$this edit $docSection
}
method WordDocEditor::print {this docSection} {
$this edit $docSection
}
method WordDocEditor::preview {this docSection} {
$this edit $docSection
}
# Do not delete this line -- regeneration end marker