water Posted July 16, 2013 Author Posted July 16, 2013 The newest beta versions of Autoit (3.3.9.6 and 3.3.9.7) already include the latest version of this UDF and replace the version delivered with Autoit 3.3.8.1 This is a script breaking change so be sure to change existing scripts if using the latest beta. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
hogfan Posted September 27, 2013 Posted September 27, 2013 MVPs - I just installed the latest Beta version of AutoIT and update my script and everything is working fine except I am unable to use the $bVisible & $bForceNew parameters on the _Word_Create function. I get a variable used before being delared error. If I remove the both of these parameters, everything works fine, but of course the Word window in not hidden from the user as I need it to be. -hogfan
water Posted September 27, 2013 Author Posted September 27, 2013 Can you please post the code you use and the error message you get in the SciTE output pane? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
hogfan Posted September 27, 2013 Posted September 27, 2013 (edited) ;Open the correct letter template Local $oWordApp = _Word_Create($bVisible = False, $bForceNew = True) ;Msgbox(0,"", "Created Word Instance") Local $oDoc = _Word_DocOpen($oWordApp, $myTemplate) and the output from Scite: --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop "C:\myapp.au3" (5718) : ==> Variable used without being declared.: $oWordApp = _Word_Create($bVisible = False, $bForceNew = True) $oWordApp = _Word_Create(^ ERROR ->12:32:58 AutoIt3.exe ended.rc:1 >Exit code: 1 Time: 47.080 Edited September 27, 2013 by hogfan
water Posted September 27, 2013 Author Posted September 27, 2013 Your syntax is wrong: Please try: ;Open the correct letter template Local $oWordApp = _Word_Create(False, True) ;Msgbox(0,"", "Created Word Instance") Local $oDoc = _Word_DocOpen($oWordApp, $myTemplate) My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
hogfan Posted September 27, 2013 Posted September 27, 2013 That worked. Thanks for the assistance. The example showed the = so I thought I needed to specify. Working good now! Thanks for the updates to this UDF. It is very useful. My users will be very happy their letter automation is working again. -hogfan
water Posted September 27, 2013 Author Posted September 27, 2013 What you see is only the description of the syntax to be used in your code. Example: _Word_Create([$bVisible = False[, $bForceNew = True]]) This means: Both parameters are optional because they are put into brackets. If you don't specify them then the value after the "=" is used as the default value. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Moderators Melba23 Posted January 2, 2014 Moderators Posted January 2, 2014 Thread closed as UDF now part of release v3.3.10.2. All further bug reports or feature requests should be made through Trac. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts