Using VBA to load a picture and paste it to the clipboard

PowerPoint

    Next

  • 1. PowerPoint 2001 quits on startup
    I've been using all the Office 2001 programs successfully for years on my G4, running it on Classic since I upgraded to OS 10.3.9 last year. Now, suddenly, PowerPoint won't run. It quits immediately on startup although Word and Excel still run just fine. I tried reinstalling the whole Office 2001 Suite but the problem persists. Does anyone have any suggestions? Franny
  • 2. PPS .... NO MUSIC!
    Version: 2004 Operating System: Mac OS X 10.4 (Tiger) HI.. I AM TRYING MY DARNDES TO INSERT A 'FILE' FROM ITUNES, AND I CANNOT DO IT... EVERYTHING ELSE IS WORKING LIKE A CHARM! PLEASE HERLP ME OUT, THANKS, JUDI DUNN
  • 3. Multiple Monitors
    Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I have three Monitors and on my old system I remember being able to chose which monitor i wanted the Powerpoint Presentations to play on. I can't find that anywhere with 2008. Any ideas on how to make the Slide Shows play on my middle monitor? Thanks in advance... Gary
  • 4. Insert Slide = Screen Shift (Jumble)
    I am trying to figure out an issue one of my clients is having with a Powerpoint file. The machines I am testing this file on are all Intel Based Macs (MacBook, MacBook Pro) running Microsoft Office 2004 and Leopard (latest updates). Ok, where is what is happening. They have a powerpoint file with 28 slides. If the user clicks on slide 28 and then inserts a new slide (Insert > New Slide) a new slide is added (slide 29). When you start typing a new title to the slide, the machine does this weird screen shift (to the left) and there is a slight bit of pixelation and different colors across the screen. Sometimes it also causes a kernal panic. This problem is consistent on three different machines (MacBook Pro 2.4 Ghz Intel Core 2 Duo, MBP 2.1 Ghz Intel Core 2 Duo, MacBook 2.0 Ghz Intel Core 2 Duo). I can't figure out how to get rid of this error. If this file is opened in Office 2008 (latest version) and the new slide method is used there is no problem. I know I can upgrade the customer to 2008 but I am thinking it might cause other problems that I don't want to deal with. I would like to know if anyone else has seen this issue. Do you think the file is corrupted? I am looking for any reason why this file my be causing this result or how I can work out the issue so the customer can continue to use 2004 with confidence knowing that there was an reason for this issue. Thanks, Brent

Re: Using VBA to load a picture and paste it to the clipboard

Postby Steve Rindsberg » Thu, 11 Nov 2004 05:21:29 GMT

In article < XXXX@XXXXX.COM >, Eric Crichlow 



Create a new presentation under program control
Import the graphic into it from file
Copy the graphic to put it on the clipboard
Set the presentation's .Saved property to True
Close the presentation

If you don't delete the toolbar when the add-in closes, you'll only need to do 
this once.

You can even open the temporary presentation w/o a window to speed things up 
and cut down on the visual dancing.


================================================
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================



Using VBA to load a picture and paste it to the clipboard

Postby ecrichlow » Thu, 11 Nov 2004 05:50:25 GMT

Hi all,

    I'm trying to create a custom toolbar in PowerPoint.

    To do this, I first call CommandBars.Add to create a new,
independent toolbar. No problem.

    Next, I add a button to the toolbar by calling
CommandBar.Controls.Add. No problem.

    Then I set up the button by setting various properties on it (Tag,
Caption, Style, Visible). No problem. The toolbar shows up with the
new button, which has the correct tag on it.

    But I want to add a little graphic to the button, next to the tag.

    Okay, CommandBarButton has a member called PasteFace, which pastes
the contents of the clipboard to the button. Works great if I use
another program to copy the desired image to the clipboard before my
VBA code pastes it to the button.

    But my image is saved as a file, and I need to load in that image
and paste it to the clipboard from within my VBA code, so that the
PasteFace call will work.

    And I can't figure out how to do it!

    CommandBarButton doesn't have a "Picture" property which I could
just set to get the image into it. It seems that the only way to get
the image on the button is with PasteFace.

    CommandButton has a "Picture" property. So maybe I could create a
CommandButton, set the image for it, copy it's face to the clipboard,
then paste that face to my CommandBarButton. Nope, CommandButton
doesn't have a CopyFace call to copy its face to the clipboard.

    So how do I set the image in a CommandBarButton from a file?

...Thanx...
...Eric...

Similar Threads:

1.VBA paste clipboard picture

Word 2002; windows 2000

Having a new document open and pressing a command button to run my VBA 
command: it opens a master document and copies a picture of a signature off 
the master document to the clipboard.  It closes the master document and 
returns the new document letter that I am writing.  It pastes the signature 
to the new letter.

The problem is that it does not paste it where my cursor is.  It pastes it 
at the top of the document.  Is there something in my coding that would tell 
it to paste it at the insertion point.

Thank you in advance...
 

2.How do I paste from clipboard to range using Excel VBA

I have just moved from Windows 2000 & Office 2002 (Old) to XP Pro and Office 
2003 (New).  The following statements work in the old version and also  in 
the new version when I step through the code using the debugger.  They fail 
when I try and run the macro in the new version.

Code:
Dim oSheet As Worksheet
' copy text to windows clipboard
oSheet.Paste
' error generated on the above stating "Paste method of Worksheet Class 
failed."

3.Loading Picture using URL (into Picture or Image Control) - VB6

Hi all,

I am trying to load an image into a picturebox or image control, from a 
supplied URL. Is there a way to do this? Or, do I need to code something to 
download and save the picture, and then load it like that. If so, any 
pointers on THAT one? Hehehehe. Getting a bit frustrated :(

Thanks!

-Scott- 




Return to PowerPoint

 

Who is online

Users browsing this forum: No registered users and 73 guest