High! All,
I have encountered an irritating problem with WordBasic in
templates.
Situation:
-Word 7.0 (for Win95)
-a selfstarting macro has to launched from an IBM AS/400
system, that lets a user edit a text and send it back
to the AS/400.
Problem:
-We can launch Word from an AS/400 program (the STRPCCMD
command does the trick)
-Launching Word with the /t option (to start Word and use the
specified document as a template does not seem to work.
The specified document (a template) is merely opened (and
selfstarting macro are excecuted correctly).
Problem 2:
-The user must be able to either send the document back to the
AS/400 system (by saving it as text file) or store the document
for later processing (by ending Word).
To implement this I designed an AutoOpen macro that installs a
new toolbar, prompts the user for information and returns control
to Word. The user would have to select the new toolbarbutton to
send the document to the AS/400, so I programmed a macro for that
too. To automatically store the document upon closing Word, I
made an AutoClose macro.
My first try was to make Word open a document for the user to
work with, but opening a document resulted in hiding the new
toolbar.
My second try was to use the document part of the template for
the user to work with, but that resulted in an even stranger
fenomenon: the toolbarbutton works correctly (it saves, disables
the automacro's and closes Word), but closing the document or
closing Word results in the error message: "Cannot close Word".
The offending statement is at the end of the AutoClose macro:
FileClose 2 (close Word without saving files).
Any ideas on how to get things working correctly?
___ __ __
Happy programming, / | / /__/ /
___/ /| |/ ___ /
Jigal. /____/ |___/ /_/
--- Terminate 4.00/Pro
---------------
* Origin: Point 2 is a point too at Revolution Ballroom (2:281/721.2)
|