# Word UDF - Script Breaking Changes

The Word UDF was completely rewritten to support new file formats and new features of Microsoft Word.
This means that scripts written for AutoIt up to version 3.3.8.1 won't run with later versions and need to be modified.
The following table lists the differences between the old and the new version.
More information can be found in the wiki.
Renamed, removed and changed functions/parameters

Old UDF Function/Parameter | New UDF Function/Parameter | Comments
--- | --- | ---
All Functions |  | @extended no longer contains invalid parameter number.
_Word_VersionInfo |  | Removed.
_WordAttach | _Word_DocAttach |
$s_mode = HWND |  | Removed.
$s_mode = Title |  | Removed.
| $iCase | Added. Specifies case-sensitivity for search mode "Text".
_WordCreate | _Word_Create | It's mandatory now to call this function before any other function. You could have used _WordCreate or _WordAttach in the old Word UDF. @extended is set if Word was already running.
$s_FilePath |  | Removed. Use _Word_DocOpen or _Word_DocAdd.
$f_takeFocus |  | Removed.
$f_tryAttach |  | Removed.
| $bForceNew | Added. Forces to create a new Word instance even if there is already a running instance.
_WordDocAdd | _Word_DocAdd |
_WordDocAddLink | _Word_DocLinkAdd |
_WordDocAddPicture | _Word_DocPictureAdd |
_WordDocClose | _Word_DocClose |
$f_RouteDocument |  | Removed.
_WordDocFindReplace | _Word_DocFindReplace |
_WordDocGetCollection | _Word_DocGet | @extended is set to the total number of documents.
_WordDocLinkGetCollection | _Word_DocLinkGet | @extended is set to the total number of links.
_WordDocOpen | _Word_DocOpen |
_WordDocPrint | _Word_DocPrint |
_WordDocPropertyGet |  | Removed.
_WordDocPropertySet |  | Removed.
_WordDocSave | _Word_DocSave |
_WordDocSaveAs | _Word_DocSaveAs |
$f_LockComments |  | Removed.
_WordErrorHandlerDeRegister |  | Removed.
_WordErrorHandlerRegister |  | Removed.
_WordErrorNotify |  | Removed.
_WordMacroRun |  | Removed.
_WordPropertyGet |  | Removed.
_WordPropertySet |  | Removed.
_WordQuit | _Word_Quit | Now only closes the Word application if created by this UDF.
$f_RouteDocument |  | Removed.
| $bForceClose | Added. If True the Word application is closed even when it was running at _Word_Create time.

New functions

New UDF Function/Parameter | Comments
--- | ---
_Word_DocExport | Exports the document or a range as PDF or XPS.
_Word_DocFind | Runs or repeats the specified find operation.
_Word_DocRangeSet | Sets or modifies a range in a document.
_Word_DocTableRead | Reads a Word table into a 2D-array.
_Word_DocTableWrite | Writes a 1D or 2D-array to a Word table.