I think I know why your chart Export is not coming out clear for you but can
be made fine. But there's a better way -
Get hold of Stephen Bullen's PastePicture.zip (from memory in downloads or
excel files)
http://www.oaltd.co.uk
Drag the module modPastePicture into your project. This provides the APIs
and wrapper functions required to get the image off the clipboard and save
to file. Adapt something like the following to your needs -
Sub TestRangeToBMP()
Dim lPicType As Long
Dim vFile As Variant
Dim oPic As IPictureDisp
lPicType = xlBitmap ' xlPicture for metafile or *.emf
vFile = Application.DefaultFilePath & "\TestRangeToBMP.bmp"
' or say
' vFile = Application.GetSaveAsFilename(etc
Range("a1:k20").Copy
Set oPic = PastePicture(lPicType)
SavePicture oPic, vFile
Application.CutCopyMode = False
End Sub
Normally you would want to use the CopyPicture function to give the choice
of working with a BMP or a metafile (emf). However CopyPicture is buggy in
Excel2007 unless you know exactly what you are doing (ie which formats work
with which object types - don't rely on Help or intellisense which are
wrong). The simple Copy function puts both bmp & metafile image formats on
the clipboard from range, shape and chartarea objects in 2007 (but in
earlier versions, if shape object only a metafile).
Finally, if you are concerned with quality you may find the metafile works
much better for you. Depends on what you want to do, in particular it scales
much better. Also smaller file size.
Regards,
Peter T
"ARbitOUR" wrote in message
...
Peter T;462328 Wrote:
Not sure I quite follow but if the objective is to save a copy of part
of a
worksheet as a BMP neither SendKeys nor use of a third party app such
as
MSPaint are required.
Regards,
Peter T
If you imply copying the required range to a chart / graph then
exporting it as an image file...I've already tried that and yes it does
work...
..However, unfortunately there tends to be some colour degradation
when the resulting image is printed (so much so that certain text /
values on the quotation becomes illegible...not only when printing, but
also on the digital file itself).
So the chart/graph method doesn't help me much.
If there is a third way, I'd love to know how...
:)
--
ARbitOUR
------------------------------------------------------------------------
ARbitOUR's Profile:
http://www.thecodecage.com/forumz/member.php?userid=254
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=103713