[Migrated content. Thread originally posted on 03 November 2004]
I start word through cobol open a file save it and leave word open so the user can make changes/print/email/etc.. When I do this on a client with word 2002 there is nothing wrong. When I do this on a client with word 2003 and I close word manually I get all sort of anoying question about changes made in normal.dot and if I want to save them. How can I avoid this? The code I'm using is as follows:CREATE APPLICATION OF WORD
HANDLE IN wrdApp.
MODIFY wrdApp @Visible = 1.
MODIFY wrdApp Documents::Open(
BY NAME FileName COBWORD-OPEN-BESTNAAM)
GIVING wrdDoc.
INQUIRE wrdDoc Fields IN wrdFields.
INQUIRE wrdFields Count IN WS-AANT-VELDEN.
PERFORM VARYING WS-IND FROM 1 BY 1
UNTIL WS-IND > WS-AANT-VELDEN
MODIFY wrdDoc Fields::Item(WS-IND)
GIVING wrdField
INQUIRE wrdField Type IN WS-TYPE
MOVE SPACE TO WS-NAAM
INQUIRE wrdField Result::Text IN WS-NAAM
IF WS-TYPE = 59
MODIFY wrdField Result::Text = WS-IND
END-IF
END-PERFORM.
MODIFY wrdDoc SaveAs(
BY NAME FileName COBWORD-SAVEAS-BESTNAAM).
APP-MAIN-900.
SET VANUIT-AFSLUITEN TO TRUE.
DESTROY wrdSelection.
DESTROY wrdField.
DESTROY wrdFields.
DESTROY wrdDoc.
DESTROY wrdApp.