Hi @all,
I'm working on a little Autoit script which opens a .xlsm file and does something with it.
I recently recognized that opening the file via Autoit (Excel UDF) has bad impact on the print area.
The predefined print area gets lost.
Anybody an idea how to avoid that?
#include <Excel.au3>
$sFilePath1 = @ScriptDir & "\test.xlsm" ;This file should already exist
$oExcel = _ExcelBookOpen($sFilePath1)
If @error = 1 Then
MsgBox(0, "Error!", "Unable to Create the Excel Object")
Exit
ElseIf @error = 2 Then
MsgBox(0, "Error!", "File does not exist - Shame on you!")
Exit
EndIf
If you open the test.xlsm with the script the print area is set to a1:a3
If you open the test.xlsm with the script via shellexecute or whatsoever, the print area is a1:e13
There is no marco in this test file!
Mega Test.zip