Strydr Posted December 3, 2018 Share Posted December 3, 2018 I'm trying to figure out how to work with the word.au3 udf but it's not working. Every example I attempt to run errors out with "Error creating a new Word application object. @error = 1, @extended=-2147221005" Running Windows10 and the latest version of Autoit. I had the impression that this would work on Windows with Wordpad documents, and that MS Word does not need to be installed. Do I actually need to buy and install MS Word? A LOT of people don't buy MS Office or MS Word, so I'm hoping that this is not the case. Thanks! Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted December 3, 2018 Share Posted December 3, 2018 @Strydr To use Word UDF, you need to have MS Office installed Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Nine Posted December 3, 2018 Share Posted December 3, 2018 You absolutely need MS Word to be installed...to use word.au3 UDF. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
water Posted December 3, 2018 Share Posted December 3, 2018 The UDF automates MS Word by interacting with Word through COM. Hence: You need to install MS Word to use the Word UDF How did you get the impression that the Word UDF works with Wordpad? FrancescoDiMuro 1 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 Link to comment Share on other sites More sharing options...
Strydr Posted December 3, 2018 Author Share Posted December 3, 2018 (edited) Crepes! Thank you! That really needs to be commented into the udf or posted somewhere! I never came across anything stating that! -I came across the idea that it would work without having Word installed by searching for "autoit format documents". The only references I'm coming across for formatting documents all end at the Word udf. I can't find any formatting info that doesn't involve it. And NONE of the references mention the need to actually have Word installed. Edit: I came across a reference to using Excel for this but I knew that the user would need to buy and install it, but it never occurred to me that the same thing might be the case for Word. Doh! This is driving me nuts! I just want to add basic formatting to a document: the type of document isn't even important, it can be anything that will take formatting! And print from there of course. But the assumption has to be that the user just has Windows, no extra programs. O well, back to the drawing board. At least I can stop chasing this particular tail! Edited December 3, 2018 by Strydr Link to comment Share on other sites More sharing options...
water Posted December 3, 2018 Share Posted December 3, 2018 When you have a look at the UDF page in the wiki you might find a tool that suits your needs Maybe creating a PDF from your appplication is an option: 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 Link to comment Share on other sites More sharing options...
Skysnake Posted December 4, 2018 Share Posted December 4, 2018 18 hours ago, Strydr said: A LOT of people don't buy MS Office or MS Word, so I'm hoping that this is not the case. Have a look at the RichTextFormat functions. It's not exactly Word, but very versatile. eg https://www.autoitscript.com/autoit3/docs/libfunctions/_GUICtrlRichEdit_Create.htm Skysnake Strydr 1 Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
Strydr Posted December 5, 2018 Author Share Posted December 5, 2018 (edited) Working with that now. Atm, I'm having an issue with the fact that it uses variable width formatting. In other words, different letters take up different amounts of space. So if you have 2 different sentences with the same number of characters, they will actually be different lengths. Makes formatting anything afterwords... challenging. I'm open for ideas if anyone has one. In particular, I'd love to be able to turn that off so that each character takes the same amount of space. Any thoughts? Thank you! Edit: well, one way to fix it is to change the font to 'Fixedsys'. Edit2: but that won't print properly. Interesting. Edited December 5, 2018 by Strydr Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now