ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Copying an Excel Graph to PowerPoint (https://www.excelbanter.com/charts-charting-excel/11838-copying-excel-graph-powerpoint.html)

Sandy

Copying an Excel Graph to PowerPoint
 
I am trying to copy an Excel graph to PowerPoint as a Bitmap.

PowerPoint does not seem to support paste as bitmap via a macro. Excel does
not seem to support copying a graph as a bitmap (it does support coping
worksheet data as a bitmap using the syntax "Selection.CopyPicture xlScreen,
xlBitmap").

How can I copy a graph worksheet from Excel to PowerPoint via VB code?

Thank you.

Sandy

Oliver Ferns via OfficeKB.com

Here's how to copy a chart as a bitmap picture from Excel...

From Excel VBA Help:
CopyPicture method as it applies to the Chart object.

Copies the selected object to the Clipboard as a picture.

expression.CopyPicture(Appearance, Format, Size)

expression Required. An expression that returns one of the above objects.

Appearance Optional XlPictureAppearance. Specifies how the picture should
be copied.

XlPictureAppearance can be one of these XlPictureAppearance constants.
xlPrinter. The picture is copied as it will look when it's printed.
xlScreen default. The picture is copied to resemble its display on the
screen as closely as possible

Format Optional XlCopyPictureFormat. The format of the picture.

XlCopyPictureFormat can be one of these XlCopyPictureFormat constants.
xlBitmap
xlPicture default

Size Optional XlPictureAppearance. The size of the copied picture when the
object is a chart on a chart sheet (not embedded on a worksheet).

....and here is how to pastespecial as a picture in Outlook:

......View.PasteSpecial DataType:=ppPasteOLEObject, _
DisplayAsIcon:=msoTrue, IconLabel:="New Bitmap Image"

Should do the trick but you havent stated whether you are working in Excel
VBA, Powerpoint VBA, or stand-alone VB6 App, so I can't offer any useful
code....

Hth,
Oli

--
Message posted via http://www.officekb.com

Jon Peltier

Sandy -

Why paste it as a bitmap? If it is displayed at anything but the
resolution of the chart in Excel, it will look horrible. You will have
better results pasting it as a picture, which means metafile. This will
not suffer from distortion if it has to be resized. Even better if you
copy it in Excel as a picture, by holding Shift while clicking on the
Edit menu. Copy becomes Copy Picture. Use the On Screen and As Picture
options.

For more info:

http://peltiertech.com/Excel/XL_PPT.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Sandy wrote:

I am trying to copy an Excel graph to PowerPoint as a Bitmap.

PowerPoint does not seem to support paste as bitmap via a macro. Excel does
not seem to support copying a graph as a bitmap (it does support coping
worksheet data as a bitmap using the syntax "Selection.CopyPicture xlScreen,
xlBitmap").

How can I copy a graph worksheet from Excel to PowerPoint via VB code?

Thank you.

Sandy



All times are GMT +1. The time now is 07:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com