I am trying to automatically export pictures of every sheet of my workbook.
When I check the Export Folder I see, that there are only correct formatted images (Height and Width) as blank white without any content.
Sub ExportWorkbookAsImage()
Dim ws As Worksheet
Dim strSheetName As String
Dim sView As String
For Each ws In ThisWorkbook.Worksheets
sView = ActiveWindow.View
strSheetName = ws.Name
zoom_coef = 100 / ws.Parent.Windows(1).Zoom
Set area = ws.Range(ws.Cells(1, 1), ws.Cells.SpecialCells(xlCellTypeLastCell))
area.CopyPicture xlPrinter
Set chartobj = ws.ChartObjects.Add(1, 1, area.Width * zoom_coef, area.Height * zoom_coef)
With chartobj
.Chart.Paste
.Activate
.Chart.Export "C:\Users\PC\Desktop\Neuer Ordner" & "\" & strSheetName & ".jpg"
.Delete
End With
Next ws
End Sub