caner Posted February 18, 2012 Posted February 18, 2012 i'm trying to write a script to read MS Office properties (Author,Title,Last Saved By etc) from existing MS Office files. i dont create a word document, i use existing one. i dont want to open doc files with application but only read. official example: #include <Word.au3> $oWordApp = _WordCreate(@ScriptDir & "\Test.doc") $oDoc = _WordDocGetCollection($oWordApp, 0) ConsoleWrite("Title - " & _WordDocPropertyGet($oDoc, "Title") & @CRLF) ConsoleWrite("Subject - " & _WordDocPropertyGet($oDoc, "Subject") & @CRLF) ConsoleWrite("Author - " & _WordDocPropertyGet($oDoc, "Author") & @CRLF)
water Posted February 18, 2012 Posted February 18, 2012 And the question is? 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
water Posted February 18, 2012 Posted February 18, 2012 But the script you posted does exactly what you need, doesn't it? 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
caner Posted February 18, 2012 Author Posted February 18, 2012 i dont want to create Word application. i want only use existing documents.
caner Posted February 18, 2012 Author Posted February 18, 2012 and also create a gui listbox like this photo. In fact i created an application using C# with DSOFile.dll but it doesnt work all Windows. So i want to create a code with AutoIt.
water Posted February 18, 2012 Posted February 18, 2012 Or try this, function _File_Ext_PropertiesGet. 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
caner Posted February 18, 2012 Author Posted February 18, 2012 broken link!!! Server Error in '/' Application.
caner Posted February 18, 2012 Author Posted February 18, 2012 it contains only File system metadata. i need MS Office metadata.
water Posted February 18, 2012 Posted February 18, 2012 To get MS Office metadata you have to open the file and get the data like you did in your first post. 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
caner Posted February 18, 2012 Author Posted February 18, 2012 but the code creates blank word document!
caner Posted February 18, 2012 Author Posted February 18, 2012 or opens exist document with Word. i dont want to open document actually.
water Posted February 18, 2012 Posted February 18, 2012 Then open Word invisible and quit when finished. #include <Word.au3> $oWordApp = _WordCreate(@ScriptDir & "\Test.doc", 0, 0) $oDoc = _WordDocGetCollection($oWordApp, 0) ConsoleWrite("Title - " & _WordDocPropertyGet($oDoc, "Title") & @CRLF) ConsoleWrite("Subject - " & _WordDocPropertyGet($oDoc, "Subject") & @CRLF) ConsoleWrite("Author - " & _WordDocPropertyGet($oDoc, "Author") & @CRLF) _WordQuit($oWordApp, 0) 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
water Posted February 18, 2012 Posted February 18, 2012 i dont want to open document actually.You have to open the document - that's the only way I know to access the properties. 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
caner Posted February 18, 2012 Author Posted February 18, 2012 ok but it runs slowly... i'll try it again using C#.. thank you.
water Posted February 18, 2012 Posted February 18, 2012 If you want to extract the metadata from many word documents you could extract the part where the object is created from _WordCreate, process each document in a loop and close each document but leaving word running. At the end close Word. Can't test at the moment because my Ubuntu PC doesn't understand MS Word 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
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