Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to export the whole sheet which contains more than 20 objects as one single image file. I tried to use "ExportBitmapToFile" function but it shows only intial screen objects not the down objects.
I need to do it for all the sheet in the document. Any suggestion.
Goal: to publish the image in portal.
Regards
Rajesh
Hi Rajesh,
I have the following code from the file "Visaul Magic Template" published at a some place in this forum.
SUB mcr_PrintActiveSheet
Set objWord = CreateObject("Word.Application")
objWord.Visible = False
Set objDoc = objWord.Documents.Add
Const wdOrientLandscape = 1
objDoc.PageSetup.Orientation = wdOrientLandscape
ActiveDocument.ActiveSheet.CopyBitmapToClipboard false
objWord.Selection.Paste
Const wdAlignParagraphCenter = 1
objDoc.Paragraphs(1).Alignment = wdAlignParagraphCenter
objDoc.PrintOut()
DO WHILE objWord.BackgroundPrintingStatus > 0
LOOP
objWord.Quit wdDoNotSaveChanges
Set objWord = Nothing
Set objDoc = Nothing
END SUB
I hope it helps you.
Best regards.
Hi,
Thanks for your quick response.
But sorry it doesn't work.
Regards
Hi Rajesh,
Here you are an example file. The macro has a comment code for avoid sending it to a printer.
I hope it helps you to understan how it works.
Best regards.
Hi Gallego,
Still i couldn't able to bring all the charts in one single image. I could able to bring only 10 charts (10 Gauge Chart) in the image and there are about 15 charts left.
Regards
Rajesh
Hi Rajesh,
Without a example file, I can't help you, could you attach a file?
Best regards.
Hi,
Herewith i have attached the sample application for your reference.
Regards
Rajesh
Hi Rajesh,
I've been trying a different ways for solving your problem but I can't found it, there is only an idea what could work is making a fit of your application to the screen and after execute the previous code, it is possible with the following code:
ActiveDocument.ActiveSheet.FitZoomToWindow
I hope this works for you.
Best regards.
Miguel,
I'm trying to use this code, but it seems that the "Set objWord = CreateObject ("Word.Application")" only works with Word 2007.
I have tried this on three diffferent versions (2003,2007,2010). Is there a way to make it fit all cases? If not do you know the changes that need to be made for 2003 and 2010 conversion?
Brandon
Hi,
There is not any change you have do, just set the following configuration, see attached.
I had installed the office 2007 and works perfectly.
Regards.