Ich würde das in etwas so machen ...
In Autoit eine GUI Basteln, mit einem Editfeld (für den Text), einem Textfeld (für die Nummer des DOC) und einem Save Button.
Beispiel ...
AutoIt
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <Word.au3>
$AutoIT = GUICreate("", 500, 500)
$Edit = GUICtrlCreateEdit("First line" & @CRLF, 10, 10, 300, 300, 0x0080 + 0x0040)
;$Filename = GUICtrlCreateInput("", 40, 350, 180, 25)
$Save = GUICtrlCreateButton("Save", 40, 380, 100, 25)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Save
$txt = GUICtrlRead($Edit)
_Save_to_Word()
EndSwitch
WEnd
Func _Save_to_Word()
Local $oWord = _Word_Create()
If @error <> 0 Then Exit MsgBox($MB_SYSTEMMODAL, "Word UDF: _Word_Create Example", _
"Error creating a new Word application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended)
If @extended = 1 Then
;MsgBox($MB_SYSTEMMODAL, "Word UDF: _Word_Create Example", "MS Word was not running when _Word_Create was called.")
Else
;MsgBox($MB_SYSTEMMODAL, "Word UDF: _Word_Create Example", "MS Word was already running when _Word_Create was called.")
EndIf
_Word_DocAdd($oWord)
$oWord.Selection.TypeText ($txt)
;speicher word dokument
;beende Word
EndFunc
Alles anzeigen
Gruß gmmg