PP2007: How do I have a macro available in every presentation?

  • Thread starter Thread starter Mike Tordoff
  • Start date Start date
M

Mike Tordoff

Hi PP Gurus:

I use a scientific graphing program (Slidewrite) to create figures which I
can easily copy to the clipboard. From there, I would like to have a macro
that will PasteSpecial them into Powerpoint using Windows Metafile format
and resize them to 3 inches wide. I have to use windows metafile format
because pasting in other formats corrupts the positions of components of the
pasted item.

First, what would the macro look like?

Second, how can I make the macro available every time I open a new
presentation?

I've tried making a new theme but this does not allow me to save with a
macro.

Thanks for any help or hints,

Mike in Philadelphia
 
Macro would look something like this to paste special
Dim oshp As ShapeRange
Set oshp = ActiveWindow.Selection.SlideRange(1) _
..Shapes.PasteSpecial(ppPasteMetafilePicture)

You could then use oshp to set the .left, .top,.width and .height

To make it available to all you would need to create an add in there is some
help on this here
http://pptfaq.com/FAQ00031.htm
--
Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
 
John Wilson said:
Macro would look something like this to paste special
Dim oshp As ShapeRange
Set oshp = ActiveWindow.Selection.SlideRange(1) _
..Shapes.PasteSpecial(ppPasteMetafilePicture)

You could then use oshp to set the .left, .top,.width and .height

ie

With oshp
.Left = 12.34
.Top = 23.45
.Height = 34.56
.Width = 45.67
End With

All dimensions are in points, 72 points to the inch.

To center the image on the slide, it'll help to know that you can get the slide
dimensions with:

ActivePresentation.PageSetup.SlideHeight
ActivePresentation.PageSetup.SlideWidth
 
Many thanks to both of you (Steve and John). Your solutions work and the
help has saved me hours of aggrevation.

Thanks again.

Mike in Philadephia
 
Back
Top