473,695 Members | 2,603 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error When Copying from Clipboard to PowerPoint Slide


I am trying to copy the contents of the output of SQL Reporting Services to
a PowerPoint slide. For this, I am using SQL Reporting Services to obtain an
IMAGE stream, which I paste to the Windows clipboard. Then, using automation,
I am trying to copy this information from the clipboard to a PowerPoint
slide. However, I get an error at slide.Shapes.Pa steSpecial.

I am able create a System.Drawing. Bitmap object from the memory stream that
I associate with the image stream. I can also copy an image fragment that I
clipped in MSPaint (which means it's on the clipboard) to PowerPoint using
Automation. And if I generate a CSV stream from Reporting Services, I can
copy this to the clipboard and from there to Excel. It's only that I don't
seem to be able to copy anything from the clipboard to PowerPoint if I pasted
it to the clipboard using the MemoryStream.

Does anyone have any pointers?



An unhandled exception of type 'System.Runtime .InteropService s.COMException'
occurred in WindowsApplicat ion2.exe

Additional information: Shapes (unknown member) : Invalid request.
Clipboard is empty or contains data which may not be pasted here.


// Obtain an image stream in "results", which is Byte[]

MemoryStream MemStream = new MemoryStream(re sults);
DataObject d = new DataObject();
d.SetData(DataF ormats.Tiff, MemStream);
Clipboard.SetDa taObject(d, true);

PowerPoint.Pres entation ppt;
PowerPoint.Appl ication pptApp;
PowerPoint.Slid e slide;
pptApp = new PowerPoint.Appl ication();
ppt = pptApp.Presenta tions.Add(MsoTr iState.msoTriSt ateMixed);

slide = ppt.Slides.Add( 1, PowerPoint.PpSl ideLayout.ppLay outBlank)
slide.Shapes.Pa steSpecial(Powe rPoint.PpPasteD ataType.ppPaste Default,MsoTriS tate.msoFalse," ",0,"",MsoTriSt ate.msoFalse);
ppt.SaveAs("D:\ \Ata\\test.ppt" ,
PowerPoint.PpSa veAsFileType.pp SaveAsPresentat ion, MsoTriState.mso True);
Nov 22 '05 #1
0 2474

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Ata | last post by:
Hello, I am trying to copy the contents of the output of SQL Reporting Services to a PowerPoint slide. For this, I am using SQL Reporting Services to obtain an IMAGE stream, which I paste to the Windows clipboard. Then, using automation, I am trying to copy this information from the clipboard to a PowerPoint slide. However, I get an error at slide.Shapes.PasteSpecial. I am able create a System.Drawing.Bitmap object from the memory...
by: WillRead | last post by:
I have a VB.Net application and a PowerPoint presentation explaining how each form in the application works, etc.. I would like to select and display the slide appropriate for each form by pressing the F1 key. In other words, I want to use the powerpoint presentation for my help system. I am calling the SlideShow from the applications menu, and it works great; however, the same techniques are not working for selecting individual slides. ...
by: sofakingfree | last post by:
This error is driving me nuts. The code below will run perfectly when it has a breakpoint. But as soon as I remove the breakpoint and run it normally outside of debug mode I get a strange error message that says: "Microsoft Office PowerPoint has encountered a problem and needs to close. We are sorry for the inconvience. If you were in the middle of something, the information you were working on might be lost."
by: excalibur | last post by:
I'm trying to extract data from a database in VB.net and paste it directly into a powerpoint slide. I've tried doing this one cell at a time but that runs too slowly to be practical (lots of data and a very big presentation) so I want to build up an array of data, put it onto the clipboard and then paste it all in one go into powerpoint. I've tried Dim dataArry(NumRows, NumCols) As String 'dataArry gets filled with the data I want to...
by: milkyman | last post by:
Hi there, I hope you can help me. I did download some code, from the Microsoft knolidgebase(MSDN), and it's great. I just don't know how to change the code so that it uses a template, thats on my computer, instate of a blank page. Also i want to controle the presentation with a mouse click(or both). Now it's changing a slide after 5 sec. if i press the mouse button nothing hapens. thank you for helping me.... :) here is the code:
by: EmmettBrown | last post by:
Hello, Just wondering if anyone can advise. I am trying to remotely control Powerpoint using a microprocessor. I am using RS232 (COM1). The idea is that the microprocessor sends ASCII strings to the PC and Powerpoint changes to the corresponding slide. For example: 01n - Go to slide 1 05n - Go to slide 5 02n - Go to slide 2, etc I have managed to get a VBscript macro going in Powerpoint. Once the show begins I click a button to...
by: bsg92150 | last post by:
i have a task that requires me to provide a web use with the ability to send teh current page to a power point slide. and to further complicate matters. the user may want to put the whole site into a slide. the problem is that the information is database driven and the user may not have visted the pages tha/ thankst he is requestion to download. my question is is this possable and is there an example out there that i can look at
by: akshar108 via DotNetMonster.com | last post by:
TextFrame (unknown member) : Invalid request. This type of shape cannot have a TextRange i got this error while i m fetching text from textframe which is in the slide my code is following can any one help me to get all text from slide For Each pptSlide In pptDoc.Slides shapes1 = pptSlide.Shapes
by: mumbaisalsa | last post by:
hi all, i want to run the slide show say ten slides and then close it , but in my code given below it opens the slide show and closes immediately ... .. please give me a solution to this problem 1. Please add MsPowerpoint11.0 object present in COM in ur references. 2. Code : -- Dim appPowerpoint as Powerpoint.Application
by: chrizstone | last post by:
Hi Guys, What i want to do is: I want to create a Slide programmatically where a Table is on it! Here´s my Code: String strTemplate; strTemplate = template; String tableSlide = @"C:\Temp\TableSlide_" + guid.ToString();
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.