Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to export different sheets and objects as jpg. I have this script today:
sub ExportBitmapToFile
GraphPath = "X:\Development\Eskilstuna Energi och Miljö AB\Export\"
ActiveDocument.Sheets("SH15").ExportBitmapToFile GraphPath & "Ekonomi_Alla.jpg"
end sub
sub ExportBitmapToFile_2
GraphPath = "X:\Development\Eskilstuna Energi och Miljö AB\Export\"
ActiveDocument.Sheets("SH16").ExportBitmapToFile GraphPath & "Ekonomi_Detaljer.jpg"
end sub
sub ExportBitmapToFile_3
GraphPath = "X:\Development\Eskilstuna Energi och Miljö AB\Export\"
ActiveDocument.GetSheetObject("CH115").ExportBitmapToFile GraphPath & "Ekonomi_Totalt.jpg"
end sub
But when this is run (OnPostReload) only the active sheet, or object from active sheet are exported. Can I activate sheet in some way to be able to export things on different sheets no matter how the app is saved?
Best regards
Torbjörn Ungvall (@Ungvall)
Senior Business Discovery Manager
Advectas AB
Also - is there a way to control image size of exported sheets?
Best regards
Torbjörn Ungvall (@Ungvall)
Senior Business Discovery Manager
Advectas AB
Please note that this function is NOT creating JPG files, it always exports to BMP (Bitmap) format irrespective of what you call the file. You can verify this for yourself but looking at the file in a hex editor and seeing that the header records conform to BMP file structure and NOT JPG