caner Posted February 18, 2012 Share 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) Link to comment Share on other sites More sharing options...
water Posted February 18, 2012 Share Posted February 18, 2012 And the question is? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
caner Posted February 18, 2012 Author Share Posted February 18, 2012 how can i do it? Link to comment Share on other sites More sharing options...
water Posted February 18, 2012 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
caner Posted February 18, 2012 Author Share Posted February 18, 2012 i dont want to create Word application. i want only use existing documents. Link to comment Share on other sites More sharing options...
caner Posted February 18, 2012 Author Share 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. Link to comment Share on other sites More sharing options...
water Posted February 18, 2012 Share Posted February 18, 2012 Or try this, function _File_Ext_PropertiesGet. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
caner Posted February 18, 2012 Author Share Posted February 18, 2012 broken link!!! Server Error in '/' Application. Link to comment Share on other sites More sharing options...
caner Posted February 18, 2012 Author Share Posted February 18, 2012 ok i've downloaded it. Link to comment Share on other sites More sharing options...
caner Posted February 18, 2012 Author Share Posted February 18, 2012 it contains only File system metadata. i need MS Office metadata. Link to comment Share on other sites More sharing options...
water Posted February 18, 2012 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
caner Posted February 18, 2012 Author Share Posted February 18, 2012 but the code creates blank word document! Link to comment Share on other sites More sharing options...
caner Posted February 18, 2012 Author Share Posted February 18, 2012 or opens exist document with Word. i dont want to open document actually. Link to comment Share on other sites More sharing options...
water Posted February 18, 2012 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted February 18, 2012 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
caner Posted February 18, 2012 Author Share Posted February 18, 2012 ok but it runs slowly... i'll try it again using C#.. thank you. Link to comment Share on other sites More sharing options...
water Posted February 18, 2012 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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