Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.
I have the following macro that I hope works for exporting sheets in a jpg after that the scripts has been reloaded."
Sub Test
ActiveDocument.Sheets("SH01").Activate
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.Sheets("SH01").ExportBitmapToFile "D:\QV_Data\Development\SH01.jpg"
'ActiveDocument.Sheets("SH02").Activate
'ActiveDocument.GetApplication.WaitForIdle
'ActiveDocument.Sheets("SH02").ExportBitMapToFile "D:\QV_Data\Development\SH02.jpg"
'ActiveDocument.Sheets("SH03").Activate
'ActiveDocument.GetApplication.WaitForIdle
'ActiveDocument.Sheets("SH03").ExportBitMapToFile "D:\QV_Data\Development\SH03.jpg"
End Test
To execute the macro from the script I have tried with "LET _var = Test(1);" but it doesn't work.
Is there anyone that have any suggestions?
Thanks in advance!
There is within the script-execution no ActiveDocument because this will only created after script-execution - this must triggered per gui-event or per batch-run. Also ActiveDocument.Sheets needs the sheet-name and not the sheet-id - see APIGuide.qvw:
ActiveDocument.Sheets("Main").ExportBitmapToFile "C:\MyImage.bmp"
- Marcus