Cannot copy Excel 2007 Chart and Paste as Bitmap into Powerpoint 2

A client with a Mac complains that my chart pictures in Powerpoint are 
distorted.
The text appears badly spaced. My guess is the Mac does not like the MS 
Metafile picture type.

My code has:
ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, 
Format:=xlPicture
Set PasteSlideShape = mPPSlide.Shapes.PasteSpecial(PasteDataType) 
where I have tried all values of 0..11 for  the DataType parameter
But I get for type 2 (bitmap)
         'Run-time error '-2147188160 (80048240)':
         'Shapes (unknown member) : Invalid request.  The specified data 
type is unavailable.

only datatypes 0,2,3 work. I use 0 (default, which is the same as Metafile)


I've googled for this and got these refs:

Excel 2007 copy chart as bitmap cannot paste as ppBitMap into Powerpoint 2007
http://www.pcreview.co.uk/forums/thread-3883121.php
PasteSpecial of Device Independent Bitmap with VBA in PP2007

in the full list of Excel 2007 SP2 fixes we see :
The VBA method Selection.CopyPicture does not copy the bitmap picture format 
to the clipboard. 

Excel..About says I have SP2


http://www.ozgrid.com/forum/showthread.php?t=73114
Re: Picture Copied as BitMap Ends Up As Metafile 
Andy Pope says: "For me in 2007 this code copies the chart as a bitmap and 
pastes into powerpoint as expected."
    ActiveSheet.Shapes(1).CopyPicture Appearance:=xlScreen,  Format:=xlBitmap 
    objPPTSld.Shapes.PasteSpecial ppPasteBitmap 

but I get the error as shown above.

Any ideas?

TIA 

Patrick

0
SysMod (15)
9/29/2009 10:54:06 AM
excel.charting 18370 articles. 0 followers. Follow

6 Replies
1175 Views

Similar Articles

[PageSpeed] 1

Excel 2007 charts look like crap when exported as metafiles. Change 
CopyPicture so it copies the chart as a bitmap. In either case you only 
need to paste regular in PowerPoint.

- Jon
-------
Jon Peltier
Peltier Technical Services, Inc.
http://peltiertech.com/



SysMod wrote:
> A client with a Mac complains that my chart pictures in Powerpoint are 
> distorted.
> The text appears badly spaced. My guess is the Mac does not like the MS 
> Metafile picture type.
> 
> My code has:
> ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, 
> Format:=xlPicture
> Set PasteSlideShape = mPPSlide.Shapes.PasteSpecial(PasteDataType) 
> where I have tried all values of 0..11 for  the DataType parameter
> But I get for type 2 (bitmap)
>          'Run-time error '-2147188160 (80048240)':
>          'Shapes (unknown member) : Invalid request.  The specified data 
> type is unavailable.
> 
> only datatypes 0,2,3 work. I use 0 (default, which is the same as Metafile)
> 
> 
> I've googled for this and got these refs:
> 
> Excel 2007 copy chart as bitmap cannot paste as ppBitMap into Powerpoint 2007
> http://www.pcreview.co.uk/forums/thread-3883121.php
> PasteSpecial of Device Independent Bitmap with VBA in PP2007
> 
> in the full list of Excel 2007 SP2 fixes we see :
> The VBA method Selection.CopyPicture does not copy the bitmap picture format 
> to the clipboard. 
> 
> Excel..About says I have SP2
> 
> 
> http://www.ozgrid.com/forum/showthread.php?t=73114
> Re: Picture Copied as BitMap Ends Up As Metafile 
> Andy Pope says: "For me in 2007 this code copies the chart as a bitmap and 
> pastes into powerpoint as expected."
>     ActiveSheet.Shapes(1).CopyPicture Appearance:=xlScreen,  Format:=xlBitmap 
>     objPPTSld.Shapes.PasteSpecial ppPasteBitmap 
> 
> but I get the error as shown above.
> 
> Any ideas?
> 
> TIA 
> 
> Patrick
> 
0
jonNO1 (306)
9/29/2009 11:03:49 AM
"Jon Peltier" wrote:

> Excel 2007 charts look like crap when exported as metafiles. Change 
> CopyPicture so it copies the chart as a bitmap. In either case you only 
> need to paste regular in PowerPoint.

I did that John, the client says they look just the same.
I tried all six combinations of 
chart.copypicture with xlbitmap and xlpicture
and 
slides.pastespecial with datatypes 0,2,3

   ' 0 ppPasteDefault 
   ' 1 ppPasteBitmap 
   ' 2 ppPasteEnhancedMetafile 
   ' 3 ppPasteMetafilePicture ' same as default, truncated if too wide
   ' 4 ppPasteGIF
   ' 5 ppPasteJPG

I can indeed only paste regular (default) in Powerpoint 2007, get error if I 
use bitmap datatype.

Thanks,

Patrick

0
SysMod (15)
9/29/2009 11:41:03 AM
Jon,

I've done more tests. Here is the new code with an extra step  / workaround 
/ kludge. 

ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, 
Format:=xlPicture
         
' for the Shape tests, convert it to a picture in Excel first then copy it, 
so the other formats become available except 7,8,9

ActiveSheet.Paste ' will delete this copy shape later below

' have to do this to get the shape because activesheet.paste returns boolean

Set shp = ActiveSheet.Shapes(ActiveSheet.Shapes.Count)  

shp.copy

mPPSlide.Shapes.PasteSpecial(PasteDataType) 

I can't embed images here AFAIK but if you want samples I can email them to 
you

I'll check whether the blurry effect on the text labels in the chart is from 
resizing but at the moment ppPasteBitmap is best, PNG is usable. OTOH 2,3,10 
look best in Windows so they'll have to choose what they want !


   ' PpPasteDataType:            Mac text effect
   ' 0 ppPasteDefault            broken
   ' 1 ppPasteBitmap             good, a little fuzzy
   ' 2 ppPasteEnhancedMetafile   broken
   ' 3 ppPasteMetafilePicture    broken
   ' 4 ppPasteGIF                bold, most blurry
   ' 5 ppPasteJPG                bold, medium blurry
   ' 6 ppPastePNG                bold, less blurry
   '10 ppPasteOLEObject          badly broken
   '11 ppPasteShape              badly broken
   
7,8,9 are text data formats, not applicable here


Thanks,

Patrick

0
SysMod (15)
9/29/2009 1:14:01 PM
Now that you mention it, in a client project I had to copy as picture 
using bitmap format, paste into Excel, copy this pasted picture, then 
regular paste into PowerPoint.

And while I said bitmaps in 2007 were better than metafiles, they still 
look awful.

- Jon
-------
Jon Peltier
Peltier Technical Services, Inc.
http://peltiertech.com/



SysMod wrote:
> Jon,
> 
> I've done more tests. Here is the new code with an extra step  / workaround 
> / kludge. 
> 
> ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, 
> Format:=xlPicture
>          
> ' for the Shape tests, convert it to a picture in Excel first then copy it, 
> so the other formats become available except 7,8,9
> 
> ActiveSheet.Paste ' will delete this copy shape later below
> 
> ' have to do this to get the shape because activesheet.paste returns boolean
> 
> Set shp = ActiveSheet.Shapes(ActiveSheet.Shapes.Count)  
> 
> shp.copy
> 
> mPPSlide.Shapes.PasteSpecial(PasteDataType) 
> 
> I can't embed images here AFAIK but if you want samples I can email them to 
> you
> 
> I'll check whether the blurry effect on the text labels in the chart is from 
> resizing but at the moment ppPasteBitmap is best, PNG is usable. OTOH 2,3,10 
> look best in Windows so they'll have to choose what they want !
> 
> 
>    ' PpPasteDataType:            Mac text effect
>    ' 0 ppPasteDefault            broken
>    ' 1 ppPasteBitmap             good, a little fuzzy
>    ' 2 ppPasteEnhancedMetafile   broken
>    ' 3 ppPasteMetafilePicture    broken
>    ' 4 ppPasteGIF                bold, most blurry
>    ' 5 ppPasteJPG                bold, medium blurry
>    ' 6 ppPastePNG                bold, less blurry
>    '10 ppPasteOLEObject          badly broken
>    '11 ppPasteShape              badly broken
>    
> 7,8,9 are text data formats, not applicable here
> 
> 
> Thanks,
> 
> Patrick
> 
0
jonNO1 (306)
9/29/2009 6:02:54 PM
Thanks, Jon

That expression ActiveSheet.Shapes(ActiveSheet.Shapes.Count)  

is awkward too, it would be easier to have a paste method that returns the 
pasted object.

Anyway, it occurs to me (only now!) that this is really a Powerpoint 
question. I'll ask in the PP Forums about what fonts are safe to use on both 
PC and Mac so that the metafile pictures render correctly in both Windows and 
Mac.

Regards

Patrick

0
SysMod (15)
9/30/2009 7:58:08 AM
It also may return the wrong shape in 2007 if you have any controls on 
the sheet. 2003 treats all shapes the same, at least in terms of 
stacking order and order in the collection of shapes, but 2007 has 
different hierarchies of shapes, and it can make you cry.

- Jon
-------
Jon Peltier
Peltier Technical Services, Inc.
http://peltiertech.com/



SysMod wrote:
> Thanks, Jon
> 
> That expression ActiveSheet.Shapes(ActiveSheet.Shapes.Count)  
> 
> is awkward too, it would be easier to have a paste method that returns the 
> pasted object.
> 
> Anyway, it occurs to me (only now!) that this is really a Powerpoint 
> question. I'll ask in the PP Forums about what fonts are safe to use on both 
> PC and Mac so that the metafile pictures render correctly in both Windows and 
> Mac.
> 
> Regards
> 
> Patrick
> 
0
jonNO1 (306)
9/30/2009 2:58:44 PM
Reply:

Similar Artilces:

Voice connector on Exchange server 2007.
Is there any functionality available in exchange server 2007 regarding voice connector? If not how can we create it? Thanks in advance. Ashwin Exchange 2007 has the "Universal Messaging" role which is intended for this purpose. Do you have a PBX? -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" "Microsoft Exchange 2007 command shell" <MicrosoftExchange2007commandshell@discussions.microsoft.com> wrote in message news:FAE20A61-AD17-4218-90C2-9356CA90B2A0@microsoft.com... > Is there any functionality available in exch...

Looking for Excel Help
I'm a very novice Excel user and am looking for a little help with creating a formula for a spreadsheet I'm creating for my personal use. I would appreciate some assistance if possible. Thanks in advance. Dan --- Message posted from http://www.ExcelForum.com/ Hi Dan! Post a sample of what you want to do. Your question is just a tad open ended <g> -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au Excel and Word Function Lists (Classifications, Syntax and Arguments) available free to good homes. "DanB4105" <DanB4105.ywtpa@excelfor...

New to excel
Hi All, I'm new to Excel ( and to this forum :) ) and so I hope somebody may b able to help me. I've got 2 questions.... QUESTION 1 I've got a spreadsheet which takes data from one worksheet and uses i to calculate data in a second worksheet using the following code formula: =IF('4th November 2005'!B19="","nothing here dude",IF(B19<'4th Novembe 2005'!B19,"UP",IF(B19='4th November 2005'!B19,"Same",IF(B19>'4t November 2005'!B19,"DOWN")))) The problem is, when I create a new worksheet I have...

More Columns #2
I am using all columns through IV on one of my worksheets. Does anyone know how to get more columns? Hi stacy know way using Excel. this is the maximum! -- Regards Frank Kabel Frankfurt, Germany Stacy Haskins wrote: > I am using all columns through IV on one of my > worksheets. Does anyone know how to get more columns? As Frank said, that's the maximum cols But maybe you could try transposing your table / data ? (Excel has a lot more rows than columns) If so, try: http://tinyurl.com/2nmyy for an example on using TRANSPOSE() For a one-time Tranpose: Copy > Paste Specia...

Linking files 2 ways
I have a work book that is linked to another and vise versa. As thus: Workbook A is where the input of data is made; Workbook B has a link to the input from workbook A; Workbook A retrieves the altered data back as a link. Although this all works fine with both books open, I note that if I open workbook A by itself, that the data it retrieves from Workbook B is not updated . If However, both books are open, there's no problem. I thought linked books were updated automatically if the Update remote references has been selected?? But it appears that the second book is not updated until it ...

Excel button problem
Hi All I have a macro that copies a worksheet in the active workbook and puts it into a new workbook - then formats it and deletes any buttons on the worksheet. On the first click on the button the macro works ok. On the second click, it fails because the all assigned macros on all buttons in the active workbook changed from "mba" to "book1!mba". Book 1 doesn't exists (wasn't opened, wasn't saved, doesn't have the macros). I've never experienced this problem before?? Can anyone help to solve this problem? FYI The macro to do this is c...

Excel 97 #9
Please can anyone help??? I have two columns in Excel 97. The first contains a list of statu values eg. pending, or granted or withdrawn. The second contains date eg.01/12/1997, 05/06/2003. I woudl like to know how to get all th granted apps before 31/12/2003. Can anyone help please -- Message posted from http://www.ExcelForum.com theres many ways, but an easiest way would be to do a sort. Highlight the 2 columns, click on data, then sort, then sort by status, then by date. this should group them all together. hope this helps...toe >-----Original Message----- >Please can anyo...

projecting the notes pages in PPT 2007
I want to project my notes pages to an on stage monitor in while my presentation (sans my notes) are projected behind me...I will run my notes from a second computer... How can I do it? Submitted via EggHeadCafe - Software Developer Portal of Choice C# : Image operations performer http://www.eggheadcafe.com/tutorials/aspnet/bbace980-2554-48d7-9421-73dc29ed3b21/c--image-operations-per.aspx Hi Fred See if Presenter View will do what you want with your set up: http://office.microsoft.com/en-us/powerpoint/HA100673831033.aspx?pid=CH100668261033 Lucy -- Lucy Thomson PowerPoint...

unable to paste Excel 2003 chart into Outlook 2003
(This was posted on "excel.charting" group.) I have a user who's unable to paste an Excel 2003 chart into Outlook 2003 email message. In Outlook options, the checkbox is selected for "Use Microsoft Office Word 2003 to edit e-mail messages". When I tested this on my own computer running the same version of Office, if the box is check, I have no problem pasting; if this box is cleared, I cannot paste. But on his computer, it doesn't work regardless. Thanks and regards, TL ...

learning Excel #3
Hi, I was considering learning Excel as an additional tool for my data analysis work. Is it better to use data sets that I have previously used with SPSS and apply the same analysis tools as in SPSS? For applying the appropriate tools, I was considering using excel's online help. The second option I have is to use some excel book for data analysis and apply the techniques to data sets provided with the book. Any suggestions????? regards Metal ...

Goal Seek #2
Can anyone tell me a little about goal seek? Hi basically it's used to change an input variable so that the result of the formula equals what you want it to ... say i have the following A B C 1 10 20 =A1+B1 now C1 will give me 30, but if i want to know what B1 will need to be if i want C1 to show 50, i can use goal seek Set C1 to value of 50 by changing B1 Hope this helps Cheers JulieD "Jamie Hart" <jhart@emaple.net> wrote in message news:u3OscELdEHA.244@TK2MSFTNGP12.phx.gbl... > Can a...

How do I Remove a Split from my Comments in Excel 2003? #2
I have set my current workbook to split/freeze the first column and first 2 rows. Now, when I add a comment to the second row (in any column) my comments are cut off if I should scroll down. I don't ever remember the behavior before. And I don't know what I've done to enable it but it's really annoying. How do turn this off ? ...

Offline Synchronization Problem #2
I get the following error when I try going offline. The excelption is taken from Event Viewer of the Client Machine. Event Type: Error Event Source: MSCRMOfflineSync Event Category: None Event ID: 6000 Date: 3/25/2008 Time: 5:03:33 PM User: N/A Computer: WINXP Description: An error occurred during Offline Synchronization. Try going offline again, or restart Microsoft Outlook. saInsert failed for entity 'ActivityMimeAttachment', batchRows=0 with exception System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument li...

Excel corrupts when asking to update vlookups
We are experiencing weird behavior with some Office 2K3 Excel spreadsheets that contain lots of calculations, but no macros. On some pc’s Excel acts normally, on others you get the error. I have a couple of screen shots available. Any help is appreciated. If desired, send your file to my address below. I will only look if: 1. You send a copy of this message on an inserted sheet 2. You give me the newsgroup and the subject line 3. You send a clear explanation of what you want 4. You send before/after examples and expected results. -- Don Gu...

Uninstall of mappoint has caused errors with excel
Hi, I am running Office 2003 on the terminal server (windows 2003) and had a copy of mappoint as well. This is a mapping program. We ininstalled mappoint which has caused an error message with Excel and other office products. The error says "Cd:\documents and settings\administrator.ocrdc1\application data\microsoft\addins c:\Program files\common files\microsoft shared\geography\mpoai9.dll is not a valid add-in." I then click OK and excel opens up and everything is fine. The problem is that we are using other programs as well such as Quickbooks that export to excel and t...

Contacts in Exchange #2
We are running Exchange 2003 and Outlook 2003. I have tried to give a user rights to her boss's contacts through delegation and setting the rights on the contacts folder, however, while she has the rights she is unable to add or see her boss's contact folder in her Outlook. She can see it if she runs a search, but can not permanently put it in her list of contact folders. IS there a way that I can accomplish this through the back-end? Thanks, Joseph rapoport jrapoport@insurmark.net ...

I need to print a word in PDF from excel.
Hi, In my excel Macro, I update several values and then open a word linked with that excel. Finally what I need to do is to print that word to PDF. I already have a PDF Printer, so I just need the code to do it. Can anybody help me? Thanks in advance. Gast=F3n. Habilita la impresora predeterminada como la PDF y ya lo puedes imprimir a al formato deseado Gracias Francisco,=20 Tienes alg=FAn codigo para ello? gracias Repitiendo: Desde el panel de impresoras asigno primero la que me interesa y despues ejecuto mi macro desde el archivo excel asignando la instruccion sig: midefaultes = a...

Let me use the Line Color icon on charts
It would speed up a lot of my work if I could use the Line Color icon on Excel charts, the same way I am able to use the Fill Color and Font Color icons. However, when I highlight any chart object, like the Plot Area, Chart Area, or a Series, the Line Color icon is disabled. -- Stuart Bratesman, Jr., MPP Muskie School of Public Service Univ. of Southern Maine Portland, Maine ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If ...

q Emailing Excel Sheet With Outlook
I am trying to send a table from Excel within the body of an Outlook (lastest versions) to be sent as a fax. Am able to do this, BUT when the document prints out on the fax machine the formating is off (too big for the sheet). I am flexible on changing the method I send it to the fax machine, however it must be sent to the fax via macro. Below is the code I am using. Any help would be greatly appreciated. David Public Sub DoIt() 'On Error GoTo Handler Dim EmailAddress(0 To 2) As String Dim Count As Integer Dim N As Integer Dim sRec1(0) As String Dim sRec2(0 To 1) As...

outlook 2007 e-mail
how do you stop e-mails from automatically downloading when you open outlook 2007. i would like to be able to open outlook 2007 and have it wait for me to select 'receive' before downloading e-mails to my system. i know there is a way to do it in outlook 2003 but i do not remember how to do it there and i cannot find how to do it in outlook 2007. -- emerson Uncheck the option to send/receive at a specific interval. --=81 Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted w...

how do I add error bars to a 3D chart in excel?
The help states you can only add error bars to data series in 2D area. Is there a way to add them to a 3D chart? Hi, I would not have thought so. Obviously as it is not a built-in option the only way would be a work around perhaps using dummy series. Unfortunately you can create 3d combination charts. Stick with the 2d view. Cheers Andy elahe wrote: > The help states you can only add error bars to data series in 2D area. Is > there a way to add them to a 3D chart? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info I checked, and error bars are not offered for 3D ch...

Exchange 2007 Content Conversion/Encoiding issue.
Hello I have an Exchange 2007 RTM box running in a Windows 2003 only domain. When we scan a document from our Dell 1815n multifunction and have the output emailed, the document shows up as encoded garble instead of an attached document. A message header from a bad email is below. When we scan a document from the same device and send it to a mailbox that still lives on our last remaining Exchange 2003 server, the output from the scanner is attached as a PDF document normally. Any ideas? Thanks Michael Buckley Header from email recieved to Exchange 2007: (server names and I...

ERROR: 5.1.2 or other punctuation after the recipient's email address.
I am trying to send a email to a group address I created with 58 addresses in it. When I try to send the email to this group I get the following Error: "5.1.2 or other punctuation after the recipient's email address. " I have gone back to the original contact cards and made sure the addresses were all legal. I have re-created the list, same problem I have re-booted, same thing. Any thoughts out there? Thanks Dunc My wife and I have MBP's and are both running MS Office for Mac's, Entourage 12.2.3. Both of us have messages cued up in the out boxes th...

Problem with named range for a large spreadsheet in Excel 2007
Hello, I am trying to generate a large Excel spreadsheet apprx. 10000 rows and 40 columns. I am generating defined name section in the Workbook.xml part of the XLSM package. Here is a sample entry from that section <definedName name="_._44802_._0_._0_._0_._top_line" localSheetId="0" hidden="1">Sheet1!$B$2</definedName> Although the generation goes fine, I can not open the spreadsheet as the Excel throws an error message saying the package is corrupt. But this is not the case if the spreadsheet is small say, 200 rows by 10 columns. ...

Excel VBA
When you select the autofilter, the drop down list is created from the unique data in that column. Is there any way to customize this list, so the changes are permanent? For instance, I might have in one(1) column the following 4 row entries: red, blue, green (all are single cell entries) red, blue red blue, green I want my autofilter drop down list to read: red instead of red, blue, green blue red, blue green red blue, green (like normal) If I chose red from the drop down list...