Sxuiddly 0 Posted May 23, 2010 Hi, Found this old application I wrote a while ago for XP, it takes user input and customizes a word document for use. I used it frequently at school, but moved away from it because of its limitations. When i ran it on my new Windows 7 (64bit) system it didn't work. I opened the script and got this error. >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\Michael\Documents\SchoolApp\Rev 8\New School Workbook.au3" --> Word.au3 Error from function _WordDocOpen, $_WordStatus_InvalidObjectType --> Word.au3 Error from function _WordDocGetCollection, $_WordStatus_InvalidObjectType --> Word.au3 Error from function _WordDocFindReplace, $_WordStatus_InvalidDataType --> Word.au3 Error from function _WordDocFindReplace, $_WordStatus_InvalidDataType --> Word.au3 Error from function _WordDocSaveAs, $_WordStatus_InvalidDataType The function that does all the work is below. Everything else in the script works fine and it still works seamlessly on my old XP machine. Func Creation() $oWordApp = _WordCreate(@ScriptDir & "\" & "SchoolWorkTemplate.doc",0,1) $oDoc = _WordDocGetCollection($oWordApp, 0) $oFindSub = _WordDocFindReplace($oDoc, "Subject", GUICtrlRead($SubInput)) $oFindDate = _WordDocFindReplace($oDoc, "Date", _DateTimeFormat( _NowCalc(),1)) $oSavePath = _Pathfull(@ScriptDir & "\School\") $oSaveAs = _WordDocSaveAs($oDoc, $oSavePath & GuiCtrlRead($SubInput) & " - " & _DateTimeFormat( _NowCalc(),1) & " - " & @Hour & "-" & @Min & "-" & @Sec) $oFocus = WinActivate(GUICtrlRead($SubInput)) $oTypeReady = Send("{DOWN}{DOWN}{DOWN}") $oSave = _WordDocSave($oDoc) $oUnhide = _WordPropertySet($oDoc, "visible", true) exit EndFunc Any help is greatly appreciated. Share this post Link to post Share on other sites
GtaSpider 10 Posted March 8, 2011 Same here... after i just installed a new fresh win7x64 installation it doesnt work yet. bevore the re-installation of win7 it worked perfectly.. Any suggestions how to solve this? Thanks Greetz Spider www.AutoIt.de - Moderator of the German AutoIt Forum Share this post Link to post Share on other sites