Powerpoint paste image

N

Nicholas.Nezis

I need to paste an image at a certian location and size into a
powerpoint slide. I can add a picture to a specific location, but the
method requests a file path. With the paste method there are no
arguments for location and size. How can I achieve this? Thank you in
advance.
 
S

Steve Rindsberg

I need to paste an image at a certian location and size into a
powerpoint slide. I can add a picture to a specific location, but the
method requests a file path. With the paste method there are no
arguments for location and size. How can I achieve this? Thank you in
advance.

<aircode>

Dim oSh as Shape
Dim oSl as Slide
' assuming you have a reference set to the slide you want:

Set oSh = oSl.Shapes.Paste(1)
With oSh
.Left = 0
.Top = 0
.Width = ActivePresentation.PageSetup.SlideWidth
.Height = ActivePresentation.PageSetup.SlideHeight
End With

</aircode>
 
N

Nicholas.Nezis

Steve,

Is there any way to add the image without touching the clipboard? I
have the image sitting in memory and have been able to add to the slide
using the paste command, but sometimes my image doesn't showup, but
perhaps some random text or file links from some previous copy
operation. Is there any other way to add an image besides the paste and
addimage("path") commands?
 
S

Steve Rindsberg

Steve,

Is there any way to add the image without touching the clipboard? I
have the image sitting in memory and have been able to add to the slide
using the paste command, but sometimes my image doesn't showup, but
perhaps some random text or file links from some previous copy
operation. Is there any other way to add an image besides the paste and
addimage("path") commands?

Other than using the built-in Office button images, not that I know of.
It may be a matter of timing ... don't pull the image into memory now, do other
stuff, hang around a while, grab lunch, come back, paste. ;-)

Perform the two operations as nearly together in time as possible to minimize
some other app/user action changing the clipboard.
 
M

msnews.microsoft.com

Look into the Shape objects on a Slide. There is a method to .AddPicture()
or something along those lines.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top