# [SOLVED] Poor Image Quality for Excel Charts Inserted as Images into Word Document



## ExcelentEnginer (Oct 2, 2008)

Hello All,

I'm having some difficulty with achieving a good image quality when I insert Excel charts as images into a Word document. I'm using Excel 2003 and Word 2010. I developed a custom toolbar for standardising my chart formatting and exporting charts to image files. All my charts are saved on separate chart sheets and are defaulted to A4 size. I never use embedded charts on the worksheet.

I've tried exporting charts to all the usual bitmap formats (i.e. png, .gif, .tif). The code I've developed is given below


```
For i = 1 To NumChrts
      
        If i < 10 Then
        
            Charts(i).Export Filename:=CurrFolder & "\000" & i & " - " & _
                Charts(i).Name & ".gif", FilterName:="gif"
                
        ElseIf i >= 10 And i < 100 Then
        
            Charts(i).Export Filename:=CurrFolder & "\00" & i & " - " & _
                Charts(i).Name & ".gif", FilterName:="gif"
                
        ElseIf i >= 100 And i < 1000 Then
        
            Charts(i).Export Filename:=CurrFolder & "\0" & i & " - " & _
                Charts(i).Name & ".gif", FilterName:="gif"
        
        ElseIf i >= 1000 And i < 10000 Then
        
            Charts(i).Export Filename:=CurrFolder & "\" & i & " - " & _
                Charts(i).Name & ".gif", FilterName:="gif"
                   
        End If
    
    Next i
```
The quality of the charts exported to the picture files are perfect (see attached sample). They even remain perfect quality when inserted into Word (see attached sample .doc document). The trouble is, when I print from Word, the quality of the charts is terrible (see attached pdf file). All three bitmap file formats produce the same result.

I know that .png, .gif and .tif don't take being resized too well. Having said that, these charts are being inserted into a thesis. There will be hundreds of them in total so it is dam near impossible to know in advance what size to export them as so I need to have the flexibility to be able to resize the images as needed. 

Any pointers will be useful.

Tony


----------



## macropod (Apr 11, 2008)

*Re: Poor Image Quality for Excel Charts Inserted as Images into Word Document*

Hi Tony,

Try pasting the chart into Word using the native Excel Chart object format, or at least the enhanced metafile format. Either of these should preserve the vector information neccesary for high-res output. The bitmap images you're working with would have to be much better than screen resolution before they'd have a hope of producing quality prints.


----------



## ExcelentEnginer (Oct 2, 2008)

*Re: Poor Image Quality for Excel Charts Inserted as Images into Word Document*



macropod said:


> Hi Tony,
> 
> Try pasting the chart into Word using the native Excel Chart object format, or at least the enhanced metafile format. Either of these should preserve the vector information neccesary for high-res output. The bitmap images you're working with would have to be much better than screen resolution before they'd have a hope of producing quality prints.


Hi Paul,

Thanks for the pointers. I would prefer not to have to copy and paste anything from Excel to Word if I can avoid it. The reason why I was attempting to do it the way I described above was that I have literally hundreds of Excel charts that I will need to include in my thesis. 

The macro I wrote exports all charts in a workbook to separate pictures files that are stored in a subfolder named after the Excel workbook where they came from in a designated location on my hard drive. I insert the charts using insert picture from file. I find this far more convenient that opening and closing multiple Excel workbooks and scrolling back and forth through them to find charts. 

I know VBA works with Word too I am wondering, rather than exporting charts to separate picture files, is there any way that I can export my charts to separate word files as native Excel Chart object format instead and do a similar operation to insert picture from file to get them into my thesis? Alternatively, is there any mechanism for changing the resolution of the charts using the Export command?


----------



## ExcelentEnginer (Oct 2, 2008)

*Re: Poor Image Quality for Excel Charts Inserted as Images into Word Document*

I mamaged to re-write my ExportCharts routine so that they are exported to separate word documents in Enhanced Metafile Format and the quality is now perfect.


----------

