3 posts in this topic
I'm trying to open a document with _WordDocOpen and replace some text in it with _Word_DocFindReplace and then print with _Word_DocPrint and finally close with _Word_DocClose and kill word with _Word_Quit. Works perfectly.
My question is (can't find an answer anywhere): Can i do those commands in the background so i don't see word opening and replacing everything? Can't find anything in the proprieties of "WordDocOpen".
I have tried to use _Excel_RangFind, but it fails. It even fails in the example in the help file (see example 1).
This the error
>Running AU3Check (126.96.36.199) from:C:\Program Files (x86)\AutoIt3 input:C:\Program Files (x86)\AutoIt3\Examples\Helpfile\_Excel_RangeFind.au3 +>12:09:10 AU3Check ended.rc:0 >Running:(188.8.131.52):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Program Files (x86)\AutoIt3\Examples\Helpfile\_Excel_RangeFind.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop "C:\Program Files (x86)\AutoIt3\Include\Excel.au3" (656) : ==> The requested action with this object has failed.: $aResult[$iIndex] = $oMatch.Name.Name $aResult[$iIndex] = $oMatch^ ERROR My own code fails with a similar message
Local $aResult = _Excel_RangeFind($oWorkbook, "john") _ArrayDisplay($aResult) Help please.
I cannot get the method movestart to work in my program
$oRange = _Word_DocFind($oDoc, "3 4") ; return a range $oRange.MoveStart($WdLine,-1) ; supposed to move the start range to the beginning of the line I get an error '... requested action with this object has failed.'
I have seen this statement used in Word.Udf, but cannot see why my statement is failing.
This question may be trivial: I am working on an application where customers can define parameters etc in Excel files (also). But the definition may be done in an office environment, whereas the definition file may be used in production, where Excel may not be available.
So, in a compiled script (including excel.au3), can I read excel XLSX files (read-only is OK), or do I need certain components like ADO, or.. am I out of luck ?
I can imagine others have been in similar situations, so would like to know the practicalities of the problem. If impossible, I will have to come up with something else / workaround.
I wrote a script which deletes a single or range of columns from an excel file, however, I found that the file is frequently modified and the automation is not smooth.
The task can be achieved in two ways, please help me in whichever is simple.
1) Instead of column number, I delete single column or range of columns on the basis of heading in the first cell of the column. This way I will be able to select the desired columns even if the column number changes.
2) I select the columns on the basis of heading in the first cell of each column and paste it in a new sheet or new excel file. This way I will get the desired column where ever they are in the file.