Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Everyone,
I have a Macro that is working to export one chart to a png file. I wish to select and export two charts to make one png. Any help gratefully appreciated.
Macro that is working for one chart 78, i wish to see chart 78 and chart 77 on the one png?
Sub ExportToPng()
ActiveDocument.GetSheetByID("SH17").Activate
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.GetSheetObject("CH78").ExportBitmapToFile "c:\dashboard.png"
End Sub
Thanks in advance Brett
Hi Brett,
I am afraid that is not possible directly... I have tried to create a container and to put in 2 charts and later "print" it but it does not work... You could try trellis (if graph is a bars on) or grid (if graph is a pie one)...
Regards,
H
I have got container to work.
Sub ExportToPng()
ActiveDocument.GetSheetByID("SH17", "id of 2nd sheet").Activate
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.GetSheetObject("CH78").ExportBitmapToFile "c:\dashboard1.png"
ActiveDocument.GetSheetObject("CH77").ExportBitmapToFile "c:\dashboard2.png"
End Sub
Note: You can't create both sheet in single png file but pdf is possible.
Please remember to mark this as "helpful" & "correct answer" if your query has been solved.
This will help users identify the answers should they come across this thread in the future.
Regard's
Sarvesh Srivastava
Thankyou for reply, Is it possible to have CH78 and CH77 on "c:\dashboard1.png". I was trying to see if there was away to select the two charts at one time then .ExportBitmapToFile "c:\dashboard1.png"
No this is not possible, i have told you earlier.
You mentioned PDF is possible?
please read it carefully..
Just read the posts. Yes i see the difficultly in the two objects to image and understand the container works. Even if i could get the charts into power point that would be great. but need the spacing and layout to be the same and fit the power point or pdf